curl --request PATCH \
--url https://api.watchdog.no/v1/invoices/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.watchdog.no/v1/invoices/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.watchdog.no/v1/invoices/{id}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"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>",
"main_name": "<string>",
"department": "<string>",
"email": "<string>",
"website": "<string>",
"address": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country_code": "<string>"
}
}
},
"recipient": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"invoiced_as": {
"name": "<string>",
"organization_number": "<string>",
"main_name": "<string>",
"department": "<string>",
"email": "<string>",
"website": "<string>",
"address": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country_code": "<string>"
}
}
},
"amounts": {
"currency_code": "<string>",
"excluding_vat": "1250.00",
"including_vat": "1250.00",
"original": {
"currency_code": "<string>",
"including_vat": "1250.00",
"conversion_rate": "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,
"line_item_count": 1,
"document_count": 1
},
"note": "<string>",
"payment": {
"status": "paid",
"terms": "<string>",
"reference": "<string>",
"bank_account_number": "<string>",
"outstanding": {
"amount": "1250.00",
"source": "override",
"integration_amount": "1250.00"
}
},
"delivery": {
"name": "<string>",
"address": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country_code": "<string>"
},
"date": "2023-12-25"
},
"references": {
"order_references": [
"<string>"
],
"buyer_reference": "<string>",
"seller_reference": "<string>",
"contract_reference": "<string>",
"project_reference": "<string>",
"accounting_cost": "<string>",
"credit_note_invoice_reference": "<string>"
},
"additional_properties": [
{
"name": "<string>",
"value": "<string>",
"source_path": "<string>",
"scheme": "<string>"
}
],
"origin": {
"type": "structured",
"import_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_system": "<string>",
"source_invoice_id": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "Invalid input or inconsistent amounts. Details identify the failing fields or checks. Nothing is saved.",
"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": "The change would duplicate another active invoice, or a credit note used in a claim cannot change category.",
"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"
}
}Update an invoice
Updates only the fields you send. When amounts or lines change, the whole invoice must stay financially consistent, or nothing is saved. Updating does not re-run matching or compliance checks.
curl --request PATCH \
--url https://api.watchdog.no/v1/invoices/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.watchdog.no/v1/invoices/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.watchdog.no/v1/invoices/{id}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"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>",
"main_name": "<string>",
"department": "<string>",
"email": "<string>",
"website": "<string>",
"address": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country_code": "<string>"
}
}
},
"recipient": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"invoiced_as": {
"name": "<string>",
"organization_number": "<string>",
"main_name": "<string>",
"department": "<string>",
"email": "<string>",
"website": "<string>",
"address": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country_code": "<string>"
}
}
},
"amounts": {
"currency_code": "<string>",
"excluding_vat": "1250.00",
"including_vat": "1250.00",
"original": {
"currency_code": "<string>",
"including_vat": "1250.00",
"conversion_rate": "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,
"line_item_count": 1,
"document_count": 1
},
"note": "<string>",
"payment": {
"status": "paid",
"terms": "<string>",
"reference": "<string>",
"bank_account_number": "<string>",
"outstanding": {
"amount": "1250.00",
"source": "override",
"integration_amount": "1250.00"
}
},
"delivery": {
"name": "<string>",
"address": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country_code": "<string>"
},
"date": "2023-12-25"
},
"references": {
"order_references": [
"<string>"
],
"buyer_reference": "<string>",
"seller_reference": "<string>",
"contract_reference": "<string>",
"project_reference": "<string>",
"accounting_cost": "<string>",
"credit_note_invoice_reference": "<string>"
},
"additional_properties": [
{
"name": "<string>",
"value": "<string>",
"source_path": "<string>",
"scheme": "<string>"
}
],
"origin": {
"type": "structured",
"import_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_system": "<string>",
"source_invoice_id": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "Invalid input or inconsistent amounts. Details identify the failing fields or checks. Nothing is saved.",
"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": "The change would duplicate another active invoice, or a credit note used in a claim cannot change category.",
"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.
Optional protection for safely retrying a request after a timeout or lost response. Choose a unique value (for example, a UUID) for each action and reuse it with the same input when retrying. Omit it for a normal request.
1 - 200^[\x21-\x7e]+$Path Parameters
Body
At most 2 MiB, including all lines.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
invoice, credit_note, self_billed_invoice 1 - 2552000^\d{4}-\d{2}-\d{2}$^\d{4}-\d{2}-\d{2}$Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Set confirmed to true when a person has checked the extracted data, or false to clear it.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
50Response
The updated invoice.
The invoice in the Watchdog app.
invoice, credit_note, self_billed_invoice Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Processing that follows import, such as matching and compliance checks. Poll until settled, then read alerts.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The invoice-wide note in its original wording. Null means unavailable; empty text stays empty.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Other named details found in the source, with where they were found. Null when not available; empty when none were found.
Show child attributes
Show child attributes
Show child attributes
Show child attributes