curl --request DELETE \
--url https://api.watchdog.no/v1/invoices/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
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}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, 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": "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": "The invoice is evidence in a claim, or related records changed at the same time.",
"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"
}
}Soft-delete an invoice
Soft-deletes an invoice. Its documents and earlier results are kept, and it can be restored. Deleting an already deleted invoice succeeds.
curl --request DELETE \
--url https://api.watchdog.no/v1/invoices/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
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}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, 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": "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": "The invoice is evidence in a claim, or related records changed at the same time.",
"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
Response
The deleted 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