List received invoice emails
curl --request GET \
--url https://api.watchdog.no/v1/intake/emails \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.watchdog.no/v1/intake/emails', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.watchdog.no/v1/intake/emails"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"received_at": "2023-11-07T05:31:56Z",
"sender_email": "<string>",
"sender_name": "<string>",
"sender_verified": true,
"subject": "<string>",
"status": "received",
"parts": [
{
"file_name": "<string>",
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"import": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"outcome": "imported",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"primary": true,
"failure": "<string>"
},
"duplicate": true,
"failure": "<string>"
}
]
}
],
"next_cursor": "<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": "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"
}
}Invoice imports
List received invoice emails
Lists the emails the organization’s invoice address received, newest first, each with its sender and what became of each file in it: the document it was stored as and the import made from it, or why it was not kept.
List received invoice emails
curl --request GET \
--url https://api.watchdog.no/v1/intake/emails \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.watchdog.no/v1/intake/emails', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.watchdog.no/v1/intake/emails"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"received_at": "2023-11-07T05:31:56Z",
"sender_email": "<string>",
"sender_name": "<string>",
"sender_verified": true,
"subject": "<string>",
"status": "received",
"parts": [
{
"file_name": "<string>",
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"import": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"outcome": "imported",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"primary": true,
"failure": "<string>"
},
"duplicate": true,
"failure": "<string>"
}
]
}
],
"next_cursor": "<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": "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"
}
}