Find a letter original in Tripletex
curl --request POST \
--url https://api.watchdog.no/v1/invoices/{id}/letter-claims/{claim_id}/lookup-original \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_updated_at": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({expected_updated_at: '2023-11-07T05:31:56Z'})
};
fetch('https://api.watchdog.no/v1/invoices/{id}/letter-claims/{claim_id}/lookup-original', 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}/letter-claims/{claim_id}/lookup-original"
payload = { "expected_updated_at": "2023-11-07T05:31:56Z" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"error": {
"code": "validation_error",
"message": "An invoice number, identified company and creditor, or available connection is required.",
"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 letter changed, or the claim already has an original.",
"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": "The lookup could not start.",
"request_id": "req_example"
}
}Invoices
Find a letter original in Tripletex
Looks the chased invoice up in Tripletex by the creditor’s organization number and the invoice number, after checking that the connection’s company is the letter’s. The answer lands on the claim’s accounting_lookup: searching, not_found, received (not booked), open (booked, unpaid) or paid (booked, with the paid date when the posted payments settle it), or failed. A booked original is imported as history, so the letter links to it. A search already running for the claim is not started again. A ledger settlement is not proof of a cash payment.
Find a letter original in Tripletex
curl --request POST \
--url https://api.watchdog.no/v1/invoices/{id}/letter-claims/{claim_id}/lookup-original \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_updated_at": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({expected_updated_at: '2023-11-07T05:31:56Z'})
};
fetch('https://api.watchdog.no/v1/invoices/{id}/letter-claims/{claim_id}/lookup-original', 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}/letter-claims/{claim_id}/lookup-original"
payload = { "expected_updated_at": "2023-11-07T05:31:56Z" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"error": {
"code": "validation_error",
"message": "An invoice number, identified company and creditor, or available connection is required.",
"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 letter changed, or the claim already has an original.",
"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": "The lookup could not start.",
"request_id": "req_example"
}
}Authorizations
Headers
Response
The lookup runs; read the letter for its answer.