curl --request GET \
--url https://api.watchdog.no/v1/alerts \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.watchdog.no/v1/alerts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.watchdog.no/v1/alerts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"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"
}
],
"next_cursor": "<string>"
}{
"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": "conflict",
"message": "One or more selected teams have invalid saved filter rules. Update the team filters before retrying.",
"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"
}
}List alerts
Lists alerts: deviations found between an invoice and its agreement, such as an overcharge. The state of an alert is independent facets, each with its own filter: verdict (pending means no decision yet), credit, claim and claim status, validity, and whether its inputs changed since the check (changed_since_check). Words like open or unresolved have no fixed meaning: combine the filters for what the user means, or ask. Dismissed alerts and alerts with changed inputs are included unless filtered out; alerts that stopped counting are left out unless validity says otherwise. Sort by impact_amount to rank by money at stake, and use getAlertMetrics for the totals of the same filters. Filter by agreement, supplier, invoice, topic, claim, verdict, confidence or credit; use topic_ids=null for uncategorized alerts.
curl --request GET \
--url https://api.watchdog.no/v1/alerts \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.watchdog.no/v1/alerts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.watchdog.no/v1/alerts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"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"
}
],
"next_cursor": "<string>"
}{
"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": "conflict",
"message": "One or more selected teams have invalid saved filter rules. Update the team filters before retrying.",
"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.
Query Parameters
Return only these fields of each row, 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.
Only records matched by the filters of teams you belong to. Teams combine with OR; other filters combine with AND. Cannot be combined with team_ids.
true, false Only records matched by the filters of these teams: at most 50, comma-separated in a query string or an array in a JSON body. Teams combine with OR. Unknown teams return 404.
Match alerts in any of these claims; null matches alerts in no claim.
Use false to select alerts that are not currently attached to any claim.
true, false Match alerts whose current claim has any of these statuses: pending, in_progress, completed, cancelled.
Combine invoice, agreement, supplier, recipient and topic ID filters with AND (default) or OR. Tenant, validity, search and other filters always apply.
and, or is, is_not is, is_not is, is_not is, is_not is, is_not Comma-separated, at most 50 values.
Comma-separated, at most 50 values.
Match alerts whose agreement has any of these statuses: draft, active, archived.
Comma-separated, at most 50 values.
Comma-separated, at most 50 values.
Comma-separated, at most 50 values.
Match alerts in any selected topic; null matches uncategorized alerts.
Use false to select uncategorized alerts.
true, false Match alerts with any of these verdicts, whatever their credit: pending, accepted, dismissed. pending means no decision yet.
Match alerts with or without a credit, regardless of verdict.
true, false Match credit provenance: credit_note, user. null selects alerts without a credit.
Match any listed confidence level: certain, uncertain. null matches alerts without one.
Comma-separated, at most 50 values.
Match any of these correction types: modify_item, modify_invoice, add_item.
true matches alerts whose agreement or invoice changed after the check that found them; false matches alerts whose inputs are unchanged. Alerts that do not record what they assessed match neither.
true, false live (default) returns alerts that count; invalidated returns alerts that stopped counting, for example because their invoice no longer matches the agreement. Alerts in claims named by claim_ids are included either way.
live, invalidated, all Minimum impact in the organization currency, inclusive. Alerts without an impact never match.
100^-?\d+(?:\.\d+)?$Maximum impact in the organization currency, inclusive. Alerts without an impact never match.
100^-?\d+(?:\.\d+)?$Invoice issued on or after this date.
^\d{4}-\d{2}-\d{2}$Invoice issued on or before this date.
^\d{4}-\d{2}-\d{2}$Created on or after this calendar date in the organization's timezone.
^\d{4}-\d{2}-\d{2}$Created on or before this calendar date in the organization's timezone.
^\d{4}-\d{2}-\d{2}$Case-insensitive search across alert, invoice, supplier, agreement and topic text. A UUID matches the alert, invoice, supplier or agreement ID.
1 - 200Maximum number of results per page.
1 <= x <= 1000Opaque next_cursor from the previous page. Keep the same filters and sort; omit for the first page.
4096impact_amount sorts by organization-currency impact. Nulls sort last.
created_at, impact_amount, issued_date, invoice_number, supplier, verdict asc, desc