Get a claim credit note
curl --request GET \
--url https://api.watchdog.no/v1/claims/{id}/credit-notes/{credit_note_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.watchdog.no/v1/claims/{id}/credit-notes/{credit_note_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.watchdog.no/v1/claims/{id}/credit-notes/{credit_note_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"credit_note": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"invoice_number": "<string>",
"title": "<string>",
"category": "invoice",
"issued_date": "2023-12-25",
"due_date": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"supplier": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"invoiced_as": {
"name": "<string>",
"organization_number": "<string>"
}
},
"recipient": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"invoiced_as": {
"name": "<string>",
"organization_number": "<string>"
}
},
"amounts": {
"currency_code": "<string>",
"excluding_vat": "1250.00",
"including_vat": "1250.00",
"valid": true,
"errors": [
{
"code": "missing_financial_inputs",
"field": "<string>",
"message": "<string>"
}
]
},
"review": {
"recommended": true,
"extraction_confidence": "high",
"confirmed": {
"at": "2023-11-07T05:31:56Z",
"by_user_id": "<string>"
}
},
"workflows": {
"settled": true,
"credit_note_matching": {
"status": "pending",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"skip_reason": "credit_note"
},
"agreement_matching": {
"status": "pending",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"skip_reason": "credit_note"
},
"alert_check": {
"status": "pending",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"skip_reason": "credit_note"
}
},
"alerts": {
"status": "credited",
"check_status": "not_checkable",
"invoice_changed": true,
"counts": {
"pending": {
"credited": 1,
"uncredited": 1
},
"accepted": {
"credited": 1,
"uncredited": 1
},
"dismissed": {
"credited": 1,
"uncredited": 1
}
},
"agreements": {
"total": 1,
"checked": 1,
"outdated": 1
},
"scope": {
"type": "invoice",
"agreement_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
},
"relationships": {
"agreement_count": 1,
"alert_count": 1,
"linked_credit_note_count": 1,
"matched_invoice_count": 1
}
},
"direct_attachment": {
"attached_at": "2023-11-07T05:31:56Z",
"refund_created_by_attachment": true,
"refund": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"currency_code": "<string>",
"comment": "<string>",
"credit_note_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
},
"matched_invoices": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<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": "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"
}
}Claims
Get a claim credit note
Returns the link between this claim and one credit note. This read does not add a credit note or record a refund.
Get a claim credit note
curl --request GET \
--url https://api.watchdog.no/v1/claims/{id}/credit-notes/{credit_note_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.watchdog.no/v1/claims/{id}/credit-notes/{credit_note_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.watchdog.no/v1/claims/{id}/credit-notes/{credit_note_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"credit_note": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"invoice_number": "<string>",
"title": "<string>",
"category": "invoice",
"issued_date": "2023-12-25",
"due_date": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"supplier": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"invoiced_as": {
"name": "<string>",
"organization_number": "<string>"
}
},
"recipient": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"invoiced_as": {
"name": "<string>",
"organization_number": "<string>"
}
},
"amounts": {
"currency_code": "<string>",
"excluding_vat": "1250.00",
"including_vat": "1250.00",
"valid": true,
"errors": [
{
"code": "missing_financial_inputs",
"field": "<string>",
"message": "<string>"
}
]
},
"review": {
"recommended": true,
"extraction_confidence": "high",
"confirmed": {
"at": "2023-11-07T05:31:56Z",
"by_user_id": "<string>"
}
},
"workflows": {
"settled": true,
"credit_note_matching": {
"status": "pending",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"skip_reason": "credit_note"
},
"agreement_matching": {
"status": "pending",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"skip_reason": "credit_note"
},
"alert_check": {
"status": "pending",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"skip_reason": "credit_note"
}
},
"alerts": {
"status": "credited",
"check_status": "not_checkable",
"invoice_changed": true,
"counts": {
"pending": {
"credited": 1,
"uncredited": 1
},
"accepted": {
"credited": 1,
"uncredited": 1
},
"dismissed": {
"credited": 1,
"uncredited": 1
}
},
"agreements": {
"total": 1,
"checked": 1,
"outdated": 1
},
"scope": {
"type": "invoice",
"agreement_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
},
"relationships": {
"agreement_count": 1,
"alert_count": 1,
"linked_credit_note_count": 1,
"matched_invoice_count": 1
}
},
"direct_attachment": {
"attached_at": "2023-11-07T05:31:56Z",
"refund_created_by_attachment": true,
"refund": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"currency_code": "<string>",
"comment": "<string>",
"credit_note_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
},
"matched_invoices": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<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": "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 credit_note.id. Fields: credit_note, direct_attachment, matched_invoices.
Response
The credit note with its attachment and matched claim invoices.