Get the approval policy
curl --request GET \
--url https://api.watchdog.no/v1/approval-policy \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.watchdog.no/v1/approval-policy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.watchdog.no/v1/approval-policy"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"auto_approve_enabled": true,
"settings": {
"max_amount": "<string>",
"required_approvals": 25,
"single_rule": true,
"same_as_always": {
"enabled": true,
"amount_tolerance_pct": 50,
"history_count": 6
}
},
"conditions": [
{
"key": "<string>",
"kind": "trust",
"locked": true
}
],
"updated_at": "2023-11-07T05:31:56Z"
}{
"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": "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"
}
}Approval policy
Get the approval policy
The organization’s approval policy: whether invoices are decided automatically, its settings and the conditions invoices are evaluated against. The defaults while it was never saved. Every invoice is evaluated once its checks and coding have settled, and the result is shown on the invoice as approval_evaluation. The trust conditions always apply; the amount limit is set in settings. With automatic rejection on, an invoice read with confidence whose payment terms are too short is rejected by Watchdog. With automatic approval on, a trusted invoice that is the same as the supplier’s last invoices is approved by Watchdog. Rejection runs first.
Get the approval policy
curl --request GET \
--url https://api.watchdog.no/v1/approval-policy \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.watchdog.no/v1/approval-policy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.watchdog.no/v1/approval-policy"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"auto_approve_enabled": true,
"settings": {
"max_amount": "<string>",
"required_approvals": 25,
"single_rule": true,
"same_as_always": {
"enabled": true,
"amount_tolerance_pct": 50,
"history_count": 6
}
},
"conditions": [
{
"key": "<string>",
"kind": "trust",
"locked": true
}
],
"updated_at": "2023-11-07T05:31:56Z"
}{
"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": "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
Headers
Query Parameters
Response
The approval policy.