curl --request GET \
--url https://api.watchdog.no/v1/claims/metrics \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.watchdog.no/v1/claims/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.watchdog.no/v1/claims/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"total_count": 123,
"counts": {
"pending": 123,
"in_progress": 123,
"completed": 123,
"cancelled": 123
},
"refund_summary": {
"refund_count": 123,
"amount_by_currency": [
{
"currency_code": "<string>",
"amount": "<string>"
}
]
},
"summary": {
"total": {
"alert_count": 123,
"impact_by_currency": [
{
"currency_code": "<string>",
"amount": "<string>"
}
]
},
"by_verdict": {
"pending": {
"credited": {
"alert_count": 123,
"impact_by_currency": [
{
"currency_code": "<string>",
"amount": "<string>"
}
]
},
"uncredited": {
"alert_count": 123,
"impact_by_currency": [
{
"currency_code": "<string>",
"amount": "<string>"
}
]
}
},
"accepted": {
"credited": {
"alert_count": 123,
"impact_by_currency": [
{
"currency_code": "<string>",
"amount": "<string>"
}
]
},
"uncredited": {
"alert_count": 123,
"impact_by_currency": [
{
"currency_code": "<string>",
"amount": "<string>"
}
]
}
},
"dismissed": {
"credited": {
"alert_count": 123,
"impact_by_currency": [
{
"currency_code": "<string>",
"amount": "<string>"
}
]
},
"uncredited": {
"alert_count": 123,
"impact_by_currency": [
{
"currency_code": "<string>",
"amount": "<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"
}
}Get claim and refund totals
Totals for the claims matching the list filters: claim counts, attached alerts by status and their impact, and refund_summary, the money recovered through refunds. Impact is what the alerts flag, not money refunded. To total what was recovered in a period, such as this year, set refunded_from and refunded_through: refund_summary then counts only refunds recorded in that window, and the counts and alert totals cover only the claims with such a refund.
curl --request GET \
--url https://api.watchdog.no/v1/claims/metrics \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.watchdog.no/v1/claims/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.watchdog.no/v1/claims/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"total_count": 123,
"counts": {
"pending": 123,
"in_progress": 123,
"completed": 123,
"cancelled": 123
},
"refund_summary": {
"refund_count": 123,
"amount_by_currency": [
{
"currency_code": "<string>",
"amount": "<string>"
}
]
},
"summary": {
"total": {
"alert_count": 123,
"impact_by_currency": [
{
"currency_code": "<string>",
"amount": "<string>"
}
]
},
"by_verdict": {
"pending": {
"credited": {
"alert_count": 123,
"impact_by_currency": [
{
"currency_code": "<string>",
"amount": "<string>"
}
]
},
"uncredited": {
"alert_count": 123,
"impact_by_currency": [
{
"currency_code": "<string>",
"amount": "<string>"
}
]
}
},
"accepted": {
"credited": {
"alert_count": 123,
"impact_by_currency": [
{
"currency_code": "<string>",
"amount": "<string>"
}
]
},
"uncredited": {
"alert_count": 123,
"impact_by_currency": [
{
"currency_code": "<string>",
"amount": "<string>"
}
]
}
},
"dismissed": {
"credited": {
"alert_count": 123,
"impact_by_currency": [
{
"currency_code": "<string>",
"amount": "<string>"
}
]
},
"uncredited": {
"alert_count": 123,
"impact_by_currency": [
{
"currency_code": "<string>",
"amount": "<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, comma-separated; use dots for nested fields, such as counts.pending. Fields: total_count, counts, refund_summary, summary.
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.
Comma-separated, at most 50 values.
Comma-separated, at most 50 values.
Comma-separated: pending, in_progress, completed, cancelled.
Comma-separated, at most 50 values.
Text in the claim title or supplier name.
1 - 200Claims created on or after this calendar date in the organization's timezone.
^\d{4}-\d{2}-\d{2}$Claims created on or before this calendar date in the organization's timezone.
^\d{4}-\d{2}-\d{2}$Refunds recorded on or after this calendar date in the organization's timezone. Keeps only claims with such a refund, and refund_summary counts only those refunds.
^\d{4}-\d{2}-\d{2}$Refunds recorded on or before this calendar date in the organization's timezone. Keeps only claims with such a refund, and refund_summary counts only those refunds.
^\d{4}-\d{2}-\d{2}$Response
Claim counts and amounts per currency.
Show child attributes
Show child attributes
Refunds recorded on the claims: the money recovered, per refund currency. When a list or totals read sets refunded_from or refunded_through, only refunds recorded in that window.
Show child attributes
Show child attributes
Show child attributes
Show child attributes