curl --request GET \
--url https://api.watchdog.no/v1/alerts/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.watchdog.no/v1/alerts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.watchdog.no/v1/alerts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"explanation": "<string>",
"verdict": "pending",
"credit": {
"at": "2023-11-07T05:31:56Z",
"source": "credit_note",
"credit_note_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"correction_type": "modify_item",
"confidence": {
"level": "certain",
"reason": "<string>"
},
"questions": [
"<string>"
],
"impact_amount": "<string>",
"currency_code": "<string>",
"organization_currency": {
"currency_code": "<string>",
"impact_amount": "<string>"
},
"changed_since_check": {
"agreement": true,
"invoice": true
},
"invalidation": {
"at": "2023-11-07T05:31:56Z",
"reason": "unmatched"
},
"invoice": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_number": "<string>",
"title": "<string>",
"category": "invoice",
"issued_date": "2023-12-25",
"due_date": "2023-12-25",
"currency_code": "<string>",
"total_amount_including_vat": "<string>"
},
"invoice_item": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"line_number": 123,
"product_code": "<string>",
"description": "<string>",
"unit": "<string>"
},
"agreement": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": "draft",
"version": 123
},
"supplier": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"recipient": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"topic": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"is_locked": true
},
"claim": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": "pending"
},
"dismissal": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"category": "wrong_alert",
"note": "<string>",
"dismissed_at": "2023-11-07T05:31:56Z",
"dismissed_by": {
"user": {
"id": "<string>",
"name": "<string>",
"deleted": true
},
"api_key": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
}
},
"provenance": {
"origin": "check",
"created_by": {
"user": {
"id": "<string>",
"name": "<string>",
"deleted": true
},
"api_key": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
},
"agreement_version": 123,
"invoice_fingerprint": "<string>",
"retained_check": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"correction_relationships": [
{
"replacement_alert_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"replaced_alert_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"correction_relationships_truncated": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"price_item_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"expected": {
"base_price": "<string>",
"quantity": "<string>",
"discount": "<string>",
"surcharge": "<string>",
"adjustment_uplift": "<string>",
"net_price": "<string>",
"total": "<string>",
"price_explanation": "<string>",
"adjustment_explanation": "<string>",
"product_code": "<string>",
"description": "<string>",
"unit": "<string>"
},
"invoiced": {
"base_price": "<string>",
"net_price": "<string>",
"quantity": "<string>",
"discount": "<string>",
"surcharge": "<string>",
"total": "<string>"
},
"evidence": {
"citations": [
{
"source_ref": 123,
"citation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"available": true,
"source_type": "document",
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_name": "<string>",
"section_title": "<string>",
"quote": "<string>",
"verification": "verified",
"original_quote": "<string>",
"context_before": "<string>",
"context_after": "<string>"
}
],
"truncated": true
}
}{
"error": {
"code": "validation_error",
"message": "The request is invalid. details lists up to 20 field errors. Request bodies are limited to 2 MiB.",
"request_id": "req_example"
}
}{
"error": {
"code": "invalid_token",
"message": "The bearer token is missing or invalid.",
"request_id": "req_example"
}
}{
"error": {
"code": "forbidden",
"message": "Access denied. The error code says why: forbidden, token_disabled, organization_required, insufficient_role or mfa_required.",
"request_id": "req_example"
}
}{
"error": {
"code": "not_found",
"message": "The resource does not exist in the current organization.",
"request_id": "req_example"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests. Wait for the Retry-After delay before retrying.",
"request_id": "req_example"
}
}{
"error": {
"code": "internal_error",
"message": "Unexpected server failure. Include the request ID when contacting support.",
"request_id": "req_example"
}
}{
"error": {
"code": "service_unavailable",
"message": "Temporarily unavailable. Retry after the Retry-After delay, when provided.",
"request_id": "req_example"
}
}Get an alert
Returns an alert, its decision and supporting evidence. expected is the pricing the agreement gives for the line as the check applied it: base_price is the agreed unit price before discount and surcharge, and price_explanation says where it comes from. Citations of type agreement_items name the agreement prices by item_ids; listAgreementPriceItems with ids shows them as they are now. This read does not run a new check or change the verdict.
curl --request GET \
--url https://api.watchdog.no/v1/alerts/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.watchdog.no/v1/alerts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.watchdog.no/v1/alerts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"explanation": "<string>",
"verdict": "pending",
"credit": {
"at": "2023-11-07T05:31:56Z",
"source": "credit_note",
"credit_note_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"correction_type": "modify_item",
"confidence": {
"level": "certain",
"reason": "<string>"
},
"questions": [
"<string>"
],
"impact_amount": "<string>",
"currency_code": "<string>",
"organization_currency": {
"currency_code": "<string>",
"impact_amount": "<string>"
},
"changed_since_check": {
"agreement": true,
"invoice": true
},
"invalidation": {
"at": "2023-11-07T05:31:56Z",
"reason": "unmatched"
},
"invoice": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_number": "<string>",
"title": "<string>",
"category": "invoice",
"issued_date": "2023-12-25",
"due_date": "2023-12-25",
"currency_code": "<string>",
"total_amount_including_vat": "<string>"
},
"invoice_item": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"line_number": 123,
"product_code": "<string>",
"description": "<string>",
"unit": "<string>"
},
"agreement": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": "draft",
"version": 123
},
"supplier": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"recipient": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"topic": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"is_locked": true
},
"claim": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": "pending"
},
"dismissal": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"category": "wrong_alert",
"note": "<string>",
"dismissed_at": "2023-11-07T05:31:56Z",
"dismissed_by": {
"user": {
"id": "<string>",
"name": "<string>",
"deleted": true
},
"api_key": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
}
},
"provenance": {
"origin": "check",
"created_by": {
"user": {
"id": "<string>",
"name": "<string>",
"deleted": true
},
"api_key": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
},
"agreement_version": 123,
"invoice_fingerprint": "<string>",
"retained_check": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"correction_relationships": [
{
"replacement_alert_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"replaced_alert_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"correction_relationships_truncated": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"price_item_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"expected": {
"base_price": "<string>",
"quantity": "<string>",
"discount": "<string>",
"surcharge": "<string>",
"adjustment_uplift": "<string>",
"net_price": "<string>",
"total": "<string>",
"price_explanation": "<string>",
"adjustment_explanation": "<string>",
"product_code": "<string>",
"description": "<string>",
"unit": "<string>"
},
"invoiced": {
"base_price": "<string>",
"net_price": "<string>",
"quantity": "<string>",
"discount": "<string>",
"surcharge": "<string>",
"total": "<string>"
},
"evidence": {
"citations": [
{
"source_ref": 123,
"citation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"available": true,
"source_type": "document",
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_name": "<string>",
"section_title": "<string>",
"quote": "<string>",
"verification": "verified",
"original_quote": "<string>",
"context_before": "<string>",
"context_after": "<string>"
}
],
"truncated": true
}
}{
"error": {
"code": "validation_error",
"message": "The request is invalid. details lists up to 20 field errors. Request bodies are limited to 2 MiB.",
"request_id": "req_example"
}
}{
"error": {
"code": "invalid_token",
"message": "The bearer token is missing or invalid.",
"request_id": "req_example"
}
}{
"error": {
"code": "forbidden",
"message": "Access denied. The error code says why: forbidden, token_disabled, organization_required, insufficient_role or mfa_required.",
"request_id": "req_example"
}
}{
"error": {
"code": "not_found",
"message": "The resource does not exist in the current organization.",
"request_id": "req_example"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests. Wait for the Retry-After delay before retrying.",
"request_id": "req_example"
}
}{
"error": {
"code": "internal_error",
"message": "Unexpected server failure. Include the request ID when contacting support.",
"request_id": "req_example"
}
}{
"error": {
"code": "service_unavailable",
"message": "Temporarily unavailable. Retry after the Retry-After delay, when provided.",
"request_id": "req_example"
}
}Authorizations
Personal API key sent as a bearer token, together with X-Organization-Id. The key must have at least the access level the endpoint requires (read, write or admin).
Headers
The organization to act in. Required for personal API keys; list the organizations you can access with GET /v1/organizations.
Path Parameters
Query Parameters
Return only these fields, comma-separated; use dots for nested fields, such as credit.at. id is always returned. Fields: id, title, explanation, verdict, credit, correction_type, confidence, questions, impact_amount, currency_code, organization_currency, changed_since_check, invalidation, invoice, invoice_item, agreement, supplier, recipient, topic, claim, dismissal, provenance, correction_relationships, correction_relationships_truncated, created_at, updated_at, price_item_ids, expected, invoiced, evidence.
true adds context_before and context_after to document citations: the text around each quote, used to locate it in the document.
true, false Response
The alert.
The decision on the finding, independent of claim membership and credit.
pending, accepted, dismissed Supplier credit, independent of the verdict and claim.
Show child attributes
Show child attributes
modify_item, modify_invoice, add_item Show child attributes
Show child attributes
What Watchdog needs answered to decide the alert, mostly on uncertain alerts. Empty when nothing is open.
^-?\d+(?:\.\d+)?$The impact converted with the rate stored on the alert.
Show child attributes
Show child attributes
Whether the agreement or the invoice changed after the check that found this alert. A change does not make the alert wrong; check again to assess it against the new inputs. Null for older alerts that do not record what they assessed.
Show child attributes
Show child attributes
Set when the alert no longer counts, for example because its invoice no longer matches the agreement. It keeps its verdict, credit and claim, and counts again if the invoice matches again.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The current invoice line. Null when no line is linked.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The claim this alert is currently attached to, if any.
Show child attributes
Show child attributes
Why the alert was dismissed, while its verdict is dismissed, credited or not. Dismiss it again with a different category or note to change the reason. Reopening or accepting clears it; the alert activity keeps the history.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Links between an added-item alert and the line alerts it replaces.
100Show child attributes
Show child attributes
Agreement prices the alert relies on. Read them with GET /v1/agreements/{id}/price-items?ids=.
The pricing the agreement gives for this line, as the check applied it. base_price is the agreed unit price before discount and surcharge; price_explanation says where it comes from.
Show child attributes
Show child attributes
Invoiced pricing when the alert was created.
Show child attributes
Show child attributes
Show child attributes
Show child attributes