{
"error": {
"code": "validation_error",
"message": "No recipient could be placed in the company, from the invoice or from the company itself. 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": "not_found",
"message": "The resource does not exist in the current organization.",
"request_id": "req_example"
}
}
{
"error": {
"code": "conflict",
"message": "The invoice or its recipient already belongs to another company, or the company already has the same invoice.",
"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"
}
}
Invoices
Choose an invoice's company
Chooses the company of an invoice no rule placed (company_id null, found with without_company=true); suggested_company_id names the likely one. Its recipient becomes the party the invoice names, as its import read it, found or made in that company, or the company itself when it names none. The invoice then arrives in the company like a new invoice: approval rules give it approvers, and its coding and checks start. A reminder or collection notice instead starts recovering the originals it chases. Choosing the company it already has changes nothing. 409 when it already belongs to another company, when its recipient belongs to another company, or when the company already has the same invoice. Recorded in the invoice’s activity.
{
"error": {
"code": "validation_error",
"message": "No recipient could be placed in the company, from the invoice or from the company itself. 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": "not_found",
"message": "The resource does not exist in the current organization.",
"request_id": "req_example"
}
}
{
"error": {
"code": "conflict",
"message": "The invoice or its recipient already belongs to another company, or the company already has the same invoice.",
"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
Authorization
string
header
required
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
X-Organization-Id
string
The organization to act in. Required for personal API keys; list the organizations you can access with GET /v1/organizations.
Path Parameters
id
string<uuid>
required
Body
application/json
company_id
string<uuid>
required
The workspace company the invoice belongs to.
Response
The invoice in its company, and what else the change updated.
company_id
string<uuid> | null
required
The invoice's company, its recipient's. Null while no rule placed it: nothing works on it until someone chooses one (setInvoiceCompany).
suggested_company_id
string<uuid> | null
required
For an invoice without a company: the company its printed buyer likely names, for a person to accept with setInvoiceCompany. Never applied by itself; null otherwise.
id
string<uuid>
required
url
string<uri>
required
The invoice in the Watchdog app.
invoice_number
string | null
required
title
string | null
required
category
enum<string>
required
Available options:
invoice,
credit_note,
self_billed_invoice,
reminder,
collection_notice
issued_date
string<date> | null
required
due_date
string<date> | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
deleted_at
string<date-time> | null
required
supplier
object
required
Show child attributes
recipient
object
required
Show child attributes
amounts
object
required
Show child attributes
review
object
required
read-only
Show child attributes
stage
enum<string> | null
required
Superseded by lifecycle, the invoice's one status; removed once the app no longer reads it. Watchdog's approval flow, from Watchdog's facts only: rejected (closed) or approved as decided, on_hold, needs_approval while it has approvers, else inbox. Null outside the flow (see the invoice's outside_flow).
Available options:
inbox,
needs_approval,
on_hold,
approved,
rejected,
null
outside_flow
enum<string> | null
required
Superseded by lifecycle; removed once the app no longer reads it. Why stage is null: cancelled_in_source (its accounting system cancelled it), or accounting_history (marked as history on arrival; new arrivals qualify through posted rows or a settled source balance, not source approval).
Available options:
cancelled_in_source,
accounting_history,
null
lifecycle
object
required
The invoice's lifecycle, the one status every screen shows. Filter with phase, lifecycle_statuses and actionable; count with GET /v1/invoices/lifecycle-counts.
Show child attributes
accounting
object
required
The accounting system's own state of the invoice, apart from Watchdog's approval. Payment is under payment.
Show child attributes
overdue
boolean
required
True when it still waits on Watchdog past its due date (Oslo date): its lifecycle.status is in Inbox or Approval, or it is approved and not yet sent (not_ready_to_send, ready_to_send, send_failed). Once it is in the accounting system or done, it is not overdue.
approvers
object[]
required
The people asked to approve the invoice, in the order they were added.
Show child attributes
approver_teams
object[]
required
The teams asked to approve the invoice, in the order they were added. Each counts as one approver toward required_approvals.
Show child attributes
required_approvals
integer
required
How many approvers must approve the invoice: the organization's approval policy setting, however many approval steps it has. With fewer approvers than this, add more before it can be approved.
Required range: x >= 1
assigning_approvers
boolean
required
Approvers come once it is read, matched to its orders and coded: its orders' invoice approvers, else rules.
policy_approval
enum<string> | null
required
The approval policy decides instead of people: waiting (not evaluated yet, no approvers) or decided. Null when people decide.
Available options:
waiting,
decided,
null
background_runs
object[]
required
The latest run of each background area the invoice has had. Poll check_progress until it is no longer running, then read alerts and checks.
Show child attributes
alerts
object
required
Show child attributes
checks
object[]
required
One entry per check type, limited to the same scope as alerts.
Show child attributes
check_progress
enum<string>
required
Whether the invoice's checks have settled. running: a background run (also one waiting for its sync or batch) or a check is in progress; failed: a background run or a check failed and waits for its automatic retry or a person; settled: neither. Poll it after a change, then read alerts and checks. Approving one invoice is allowed either way and its activity records this; bulk approval skips unsettled invoices.
Available options:
running,
failed,
settled
relationships
object
required
Show child attributes
current_step
integer | null
required
The approval step whose turn it is (WD-2901): the first step nobody in it has approved. Approvers of later steps wait their turn. Null once every step has an approval, when any approver who has not approved may, once the invoice is decided, and while it has no approvers.
Required range: x >= 1
letter
object | null
required
Show child attributes
payment_handoff
object | null
required
How the newest letter chasing the invoice says to pay it. Null when no letter chases it, and once it is paid: what remains is the letters' own charges, decided on each letter.
Show child attributes
amount_owed
object | null
required
Detail only, on an invoice letters chase: what we owe on it and its letters.
Show child attributes
suggested_approvers
object[]
required
Detail only. Invoice approvers of its purchase orders who are not on it and could approve it now, as when an order was linked after it got its approvers. Nothing adds them by itself; add them with updateInvoiceApprovers. Empty once it is decided and while it waits for its approvers.
Show child attributes
note
string | null
required
The invoice-wide note in its original wording. Null means unavailable; empty text stays empty.
payment
object
required
Show child attributes
delivery
object
required
Show child attributes
references
object
required
Show child attributes
additional_properties
object[] | null
required
Other named details found in the source, with where they were found. Null when not available; empty when none were found.
Show child attributes
approval
object | null
required
The decision; null until it is approved or closed, and again once reopened.
Show child attributes
sent_back
object | null
required
Set while the invoice is sent back to Inbox (lifecycle.status sent_back): who sent it back, when and why. Null once it is sent for approval again.
Show child attributes
progress
object[]
required
The lifecycle: received, approved, booked, paid, each with its own state.
Show child attributes
hold
object | null
required
Set while the invoice is on hold; null otherwise.
Show child attributes
locked
boolean
required
Sent for approval: a record until it is reopened, and every correction (updateInvoice, line items, documents, classification) returns 409 until then; actions says what the caller may still do. False while it is a draft in Inbox, and for an invoice that never went through approval in Watchdog.
intake
object
required
Processing (matching, checks, coding and approvers) starts once the invoice has a company and a supplier; a recipient is optional. missing says which a person must choose. Complete means that processing ended, not that every check passed.
Show child attributes
actions
object
required
What the caller may do now, by the rules the writes apply. code: updateInvoiceCoding; pull_back: from Approval to Inbox, approvals cleared; hold: put on hold or take off. send_for_approval is still refused while lifecycle.blockers lists anything.
Show child attributes
voucher
object | null
required
The voucher the accounting system booked it on, with names from its chart of accounts. Null when none (Tripletex only).
Show child attributes
transfer
object | null
required
For an invoice or credit note Watchdog received (Peppol, email, upload) and approved under accounts payable: whether it was registered in the organization's accounting system as a supplier invoice, with its coding and payment details (Tripletex: as the person signed in on the connection, in Ikke bokførte bilag, its payment waiting for approval there or set to pay later), and booked if the integration books what it sends. Approving does not send it: transferInvoice does, and sending again retries a failed attempt. Only invoices in NOK are written so far; others fail as currency_unsupported. A written invoice stays shown after the approval is reopened. Credit notes are registered as credit notes. Null when there is nothing to send (one not approved under accounts payable, or no connection takes invoices), and while an attempt is still writing.
Show child attributes
origin
object
required
Show child attributes
sources
object[]
required
Every arrival of this invoice, in the order received: an accounting system, a Peppol message, an email attachment, an upload or an API import. The first created the invoice; later ones are linked.
Show child attributes
approval_evaluation
object | null
required
The approval policy's evaluation, made once the invoice settled; null until then.
Show child attributes
effects
object
required
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Watchdog Help Center","public":true,"description":"Guides for using Watchdog and integrating with the Watchdog API.","colors":{"primary":"#534AB7","light":"#8892E2","dark":"#6D78D5"},"logo":{"light":"https://mintcdn.com/watchdog-7cea1057/Dh-eFmjGLovXU6Kl/assets/logo-light.svg?fit=max\u0026auto=format\u0026n=Dh-eFmjGLovXU6Kl\u0026q=85\u0026s=86a9912b557a144bb94ec96beb1015f2","dark":"https://mintcdn.com/watchdog-7cea1057/Dh-eFmjGLovXU6Kl/assets/logo-dark.svg?fit=max\u0026auto=format\u0026n=Dh-eFmjGLovXU6Kl\u0026q=85\u0026s=9822ea65fa3bea7cc676786ee0c7cb14","href":"/"},"favicon":"https://mintcdn.com/watchdog-7cea1057/Dh-eFmjGLovXU6Kl/assets/favicon.svg?fit=max\u0026auto=format\u0026n=Dh-eFmjGLovXU6Kl\u0026q=85\u0026s=0a8a123bda5ec654b4d387427a855ec1","api":{"playground":{"display":"none"},"examples":{"defaults":"required","languages":["curl","javascript","python"],"prefill":false,"autogenerate":true},"url":"full"},"footer":{"links":[{"header":"Watchdog","items":[{"label":"Website","href":"https://watchdog.no"},{"label":"Support","href":"mailto:support@watchdog.no"}]}]},"seo":{"metatags":{"canonical":"https://docs.watchdog.no"},"organization":{"name":"Watchdog","url":"https://watchdog.no","logo":"https://docs.watchdog.no/assets/logo-light.svg"},"indexing":"navigable","trailingSlash":false},"contextual":{"options":["copy","view"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Watchdog","icon":"house","href":"https://watchdog.no"}]},"languages":[{"language":"en","default":true,"navbar":{"links":[{"href":"mailto:support@watchdog.no","label":"Support"}],"primary":{"type":"button","label":"Open Watchdog","href":"https://app.watchdog.no"}},"href":""},{"language":"no","footer":{"links":[{"header":"Watchdog","items":[{"label":"Nettside","href":"https://watchdog.no"},{"label":"Kundestøtte","href":"mailto:support@watchdog.no"}]}]},"navbar":{"links":[{"href":"mailto:support@watchdog.no","label":"Kundestøtte"}],"primary":{"type":"button","label":"Åpne Watchdog","href":"https://app.watchdog.no"}},"href":"no"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"watchdog-7cea1057","hasAudioNarration":false,"actualSubdomain":"watchdog-7cea1057","customDomains":["docs.watchdog.no"],"gitSource":{"type":"github","owner":"watchdog-no","repo":"watchdog-monorepo","deployBranch":"main","contentDirectory":"docs/help-center","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6afd9b25fd124ae05f54c66b","clientVersion":"0.0.4177","searchFilterCounts":[{"language":"en","tag":"API","count":300},{"language":"en","tag":"Endpoints","count":282},{"language":"en","tag":"Invoices","count":48},{"language":"en","tag":"Integrations","count":41},{"language":"en","tag":"Agreements","count":36},{"language":"en","tag":"User guides","count":33},{"language":"no","tag":"Brukerveiledninger","count":33},{"language":"en","tag":"Purchase orders","count":31},{"language":"en","tag":"Use Watchdog","count":29},{"language":"no","tag":"Bruk Watchdog","count":29},{"language":"en","tag":"Companies","count":21},{"language":"en","tag":"Documents","count":18},{"language":"no","tag":"Integrasjoner","count":18},{"language":"no","tag":"Bruk Watchdog med KI","count":6},{"language":"no","tag":"Kom i gang","count":3},{"language":"no","tag":"Administrasjon","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"privacy":{"consentBanner":{"enabled":true}},"googleFontsInlined":false},"customCss":[{"filePath":"snippets/copy-value.css","content":".copy-value-button{opacity:0;transition:opacity 150ms}tr:hover .copy-value-button,.copy-value-button:focus-visible,.copy-value-button[data-copied=\"true\"]{opacity:1}@media (hover: none){.copy-value-button{opacity:1}}"}],"page":{"pagePath":"api-reference/endpoints/invoices/choose-an-invoices-company","slug":"/api-reference/endpoints/invoices/choose-an-invoices-company","pageMetadata":{"title":"Choose an invoice's company","description":"Chooses the company of an invoice no rule placed (company_id null, found with without_company=true); suggested_company_id names the likely one. Its recipient becomes the party the invoice names, as its import read it, found or made in that company, or the company itself when it names none. The invoice then arrives in the company like a new invoice: approval rules give it approvers, and its coding and checks start. A reminder or collection notice instead starts recovering the originals it chases. Choosing the company it already has changes nothing. 409 when it already belongs to another company, when its recipient belongs to another company, or when the company already has the same invoice. Recorded in the invoice's activity.","deprecated":null,"version":null,"openapi":"/openapi.json put /v1/invoices/{id}/company","href":"/api-reference/endpoints/invoices/choose-an-invoices-company","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Chooses the company of an invoice no rule placed (company_id null, found with without_company=true); suggested_company_id names the likely one. Its recipient becomes the party the invoice names, as its import read it, found or made in that company, or the company itself when it names none. The invoice then arrives in the company like a new invoice: approval rules give it approvers, and its coding and checks start. A reminder or collection notice instead starts recovering the originals it chases. Choosing the company it already has changes nothing. 409 when it already belongs to another company, when its recipient belongs to another company, or when the company already has the same invoice. Recorded in the invoice’s activity.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Choose an invoice's company","description":"Chooses the company of an invoice no rule placed (company_id null, found with without_company=true); suggested_company_id names the likely one. Its recipient becomes the party the invoice names, as its import read it, found or made in that company, or the company itself when it names none. The invoice then arrives in the company like a new invoice: approval rules give it approvers, and its coding and checks start. A reminder or collection notice instead starts recovering the originals it chases. Choosing the company it already has changes nothing. 409 when it already belongs to another company, when its recipient belongs to another company, or when the company already has the same invoice. Recorded in the invoice's activity.","deprecated":null,"version":null,"openapi":"/openapi.json put /v1/invoices/{id}/company","href":"/api-reference/endpoints/invoices/choose-an-invoices-company","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"setInvoiceCompany","summary":"Choose an invoice's company","tags":["Invoices"],"description":"Chooses the company of an invoice no rule placed (company_id null, found with without_company=true); suggested_company_id names the likely one. Its recipient becomes the party the invoice names, as its import read it, found or made in that company, or the company itself when it names none. The invoice then arrives in the company like a new invoice: approval rules give it approvers, and its coding and checks start. A reminder or collection notice instead starts recovering the originals it chases. Choosing the company it already has changes nothing. 409 when it already belongs to another company, when its recipient belongs to another company, or when the company already has the same invoice. Recorded in the invoice's activity.","parameters":["0c889e28-332b-4487-a2d6-dffd58aba73c","76c5f18c-d971-442e-924a-6806ca0f6dda"],"security":["363105f3-526e-452a-ac24-74b279de29ab"],"x-watchdog-access":"scoped","x-watchdog-permission":"write","x-watchdog-authentication":"organization","x-watchdog-public":true,"x-watchdog-mcp":true,"requestBody":"bb3826f0-54b9-4658-bb46-2e3bbdf49040","responses":{"200":"05a61cd9-0db9-4b45-a58b-e1da7d08afdf","400":"4d172120-f214-4bcf-aa08-0b1a402d19e9","401":"8e0ead0b-8af3-43b5-b3da-940802cee1f8","403":"e4bbfa3b-0c22-42e1-9b43-c78d19aac995","404":"ff73a013-8944-4d98-860c-c69f19d4e3d4","409":"8fb662d6-f111-403a-bbc4-02dd02940dfa","429":"76ba7507-779e-4630-9974-b136f16259bd","500":"ad91cd2a-62f7-4bcb-81b2-d12be6a3b9e2","503":"ca38d68a-9b68-49be-9637-d92fa7389dda"},"method":"put","type":"path","servers":["0f259b2e-ff56-4327-8143-523787cf2165"],"path":"/v1/invoices/{id}/company","baseUrlOptions":["https://api.watchdog.no"],"title":"Choose an invoice's company","codeSamples":[],"requestExampleLanguages":["bash","javascript","python"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated","urlDisplay":"full"},"dependencies":{"parameters":{"0c889e28-332b-4487-a2d6-dffd58aba73c":{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","isRequired":false,"description":"The organization to act in. Required for personal API keys; list the organizations you can access with GET /v1/organizations.","uniqueKey":"","typeLabel":"string"},"description":"The organization to act in. Required for personal API keys; list the organizations you can access with GET /v1/organizations."},"76c5f18c-d971-442e-924a-6806ca0f6dda":{"schema":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"","typeLabel":"string\u003cuuid>"},"required":true,"name":"id","in":"path"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"company_id":{"type":"string","format":"uuid","description":"The workspace company the invoice belongs to.","isRequired":true,"uniqueKey":"company_id","typeLabel":"string\u003cuuid>"}},"required":["company_id"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"company_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"05a61cd9-0db9-4b45-a58b-e1da7d08afdf":{"description":"The invoice in its company, and what else the change updated.","headers":{"X-Request-Id":{"schema":{"type":"string"},"required":true,"description":"Request ID, also included in error bodies. Include it when contacting support."},"Cache-Control":{"schema":{"type":"string","enum":["private, no-store","private, no-store, no-transform"]},"required":false,"description":"API responses are private and must not be cached."},"X-RateLimit-Limit":{"schema":{"type":"string","example":"500"},"required":false,"description":"Requests allowed per minute for this credential, or failed API key attempts allowed per minute from this IP address."}},"content":{"application/json":{"schema":{"type":"object","required":["effects","company_id","suggested_company_id","id","url","invoice_number","title","category","issued_date","due_date","created_at","updated_at","deleted_at","supplier","recipient","amounts","review","stage","outside_flow","lifecycle","accounting","overdue","approvers","approver_teams","required_approvals","assigning_approvers","policy_approval","background_runs","alerts","checks","check_progress","relationships","current_step","letter","payment_handoff","amount_owed","suggested_approvers","note","payment","delivery","references","additional_properties","approval","sent_back","progress","hold","locked","intake","actions","voucher","transfer","origin","sources","approval_evaluation"],"properties":{"company_id":{"oneOf":[{"type":"string","format":"uuid","description":"The invoice's company, its recipient's. Null while no rule placed it: nothing works on it until someone chooses one (setInvoiceCompany).","isRequired":true,"uniqueKey":"company_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The invoice's company, its recipient's. Null while no rule placed it: nothing works on it until someone chooses one (setInvoiceCompany).","isRequired":true,"uniqueKey":"company_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"company_id","typeLabel":"string\u003cuuid> | null"},"suggested_company_id":{"oneOf":[{"type":"string","format":"uuid","description":"For an invoice without a company: the company its printed buyer likely names, for a person to accept with setInvoiceCompany. Never applied by itself; null otherwise.","isRequired":true,"uniqueKey":"suggested_company_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"For an invoice without a company: the company its printed buyer likely names, for a person to accept with setInvoiceCompany. Never applied by itself; null otherwise.","isRequired":true,"uniqueKey":"suggested_company_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"suggested_company_id","typeLabel":"string\u003cuuid> | null"},"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"id","typeLabel":"string\u003cuuid>"},"url":{"type":"string","format":"uri","description":"The invoice in the Watchdog app.","isRequired":true,"uniqueKey":"url","typeLabel":"string\u003curi>"},"invoice_number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"invoice_number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"invoice_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"invoice_number","typeLabel":"string | null"},"title":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"title.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"title.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"title","typeLabel":"string | null"},"category":{"type":"string","enum":["invoice","credit_note","self_billed_invoice","reminder","collection_notice"],"isRequired":true,"uniqueKey":"category","typeLabel":"enum\u003cstring>"},"issued_date":{"oneOf":[{"type":"string","format":"date","isRequired":true,"uniqueKey":"issued_date.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","format":"date","isRequired":true,"uniqueKey":"issued_date.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"issued_date","typeLabel":"string\u003cdate> | null"},"due_date":{"oneOf":[{"type":"string","format":"date","isRequired":true,"uniqueKey":"due_date.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","format":"date","isRequired":true,"uniqueKey":"due_date.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"due_date","typeLabel":"string\u003cdate> | null"},"created_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"updated_at","typeLabel":"string\u003cdate-time>"},"deleted_at":{"oneOf":[{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"deleted_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","isRequired":true,"uniqueKey":"deleted_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"deleted_at","typeLabel":"string\u003cdate-time> | null"},"supplier":{"type":"object","properties":{"id":{"oneOf":[{"type":"string","format":"uuid","description":"The supplier in Watchdog. Null until a person chooses it in Inbox.","isRequired":true,"uniqueKey":"supplier.id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The supplier in Watchdog. Null until a person chooses it in Inbox.","isRequired":true,"uniqueKey":"supplier.id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"supplier.id","typeLabel":"string\u003cuuid> | null"},"name":{"oneOf":[{"type":"string","description":"The party's current name in Watchdog.","isRequired":true,"uniqueKey":"supplier.name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The party's current name in Watchdog.","isRequired":true,"uniqueKey":"supplier.name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"supplier.name","typeLabel":"string | null"},"invoiced_as":{"type":"object","properties":{"name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"supplier.invoiced_as.name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"supplier.invoiced_as.name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"supplier.invoiced_as.name","typeLabel":"string | null"},"organization_number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"supplier.invoiced_as.organization_number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"supplier.invoiced_as.organization_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"supplier.invoiced_as.organization_number","typeLabel":"string | null"},"main_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"supplier.invoiced_as.main_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"supplier.invoiced_as.main_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"supplier.invoiced_as.main_name","typeLabel":"string | null"},"department":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"supplier.invoiced_as.department.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"supplier.invoiced_as.department.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"supplier.invoiced_as.department","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"supplier.invoiced_as.email.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"supplier.invoiced_as.email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"supplier.invoiced_as.email","typeLabel":"string | null"},"website":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"supplier.invoiced_as.website.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"supplier.invoiced_as.website.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"supplier.invoiced_as.website","typeLabel":"string | null"},"address":{"type":"object","properties":{"street":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"supplier.invoiced_as.address.street.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"supplier.invoiced_as.address.street.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"supplier.invoiced_as.address.street","typeLabel":"string | null"},"city":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"supplier.invoiced_as.address.city.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"supplier.invoiced_as.address.city.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"supplier.invoiced_as.address.city","typeLabel":"string | null"},"state":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"supplier.invoiced_as.address.state.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"supplier.invoiced_as.address.state.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"supplier.invoiced_as.address.state","typeLabel":"string | null"},"postal_code":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"supplier.invoiced_as.address.postal_code.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"supplier.invoiced_as.address.postal_code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"supplier.invoiced_as.address.postal_code","typeLabel":"string | null"},"country_code":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"supplier.invoiced_as.address.country_code.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"supplier.invoiced_as.address.country_code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"supplier.invoiced_as.address.country_code","typeLabel":"string | null"}},"required":["street","city","state","postal_code","country_code"],"isRequired":true,"uniqueKey":"supplier.invoiced_as.address","typeLabel":"object"}},"required":["name","organization_number","main_name","department","email","website","address"],"description":"The party as printed on the invoice. Reassigning the party changes id, never this.","isRequired":true,"uniqueKey":"supplier.invoiced_as","typeLabel":"object"}},"required":["id","name","invoiced_as"],"isRequired":true,"uniqueKey":"supplier","typeLabel":"object"},"recipient":{"type":"object","properties":{"id":{"oneOf":[{"type":"string","format":"uuid","description":"Null until the recipient is resolved, or when a letter does not identify its debtor.","isRequired":true,"uniqueKey":"recipient.id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"Null until the recipient is resolved, or when a letter does not identify its debtor.","isRequired":true,"uniqueKey":"recipient.id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"recipient.id","typeLabel":"string\u003cuuid> | null"},"name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"recipient.name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"recipient.name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"recipient.name","typeLabel":"string | null"},"invoiced_as":{"type":"object","properties":{"name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"recipient.invoiced_as.name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"recipient.invoiced_as.name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"recipient.invoiced_as.name","typeLabel":"string | null"},"organization_number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"recipient.invoiced_as.organization_number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"recipient.invoiced_as.organization_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"recipient.invoiced_as.organization_number","typeLabel":"string | null"},"main_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"recipient.invoiced_as.main_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"recipient.invoiced_as.main_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"recipient.invoiced_as.main_name","typeLabel":"string | null"},"department":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"recipient.invoiced_as.department.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"recipient.invoiced_as.department.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"recipient.invoiced_as.department","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"recipient.invoiced_as.email.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"recipient.invoiced_as.email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"recipient.invoiced_as.email","typeLabel":"string | null"},"website":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"recipient.invoiced_as.website.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"recipient.invoiced_as.website.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"recipient.invoiced_as.website","typeLabel":"string | null"},"address":{"type":"object","properties":{"street":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"recipient.invoiced_as.address.street.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"recipient.invoiced_as.address.street.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"recipient.invoiced_as.address.street","typeLabel":"string | null"},"city":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"recipient.invoiced_as.address.city.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"recipient.invoiced_as.address.city.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"recipient.invoiced_as.address.city","typeLabel":"string | null"},"state":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"recipient.invoiced_as.address.state.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"recipient.invoiced_as.address.state.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"recipient.invoiced_as.address.state","typeLabel":"string | null"},"postal_code":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"recipient.invoiced_as.address.postal_code.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"recipient.invoiced_as.address.postal_code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"recipient.invoiced_as.address.postal_code","typeLabel":"string | null"},"country_code":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"recipient.invoiced_as.address.country_code.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"recipient.invoiced_as.address.country_code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"recipient.invoiced_as.address.country_code","typeLabel":"string | null"}},"required":["street","city","state","postal_code","country_code"],"isRequired":true,"uniqueKey":"recipient.invoiced_as.address","typeLabel":"object"}},"required":["name","organization_number","main_name","department","email","website","address"],"description":"The party as printed on the invoice. Reassigning the party changes id, never this.","isRequired":true,"uniqueKey":"recipient.invoiced_as","typeLabel":"object"}},"required":["id","name","invoiced_as"],"isRequired":true,"uniqueKey":"recipient","typeLabel":"object"},"amounts":{"type":"object","properties":{"currency_code":{"oneOf":[{"type":"string","description":"Currency of every amount on the invoice.","isRequired":true,"uniqueKey":"amounts.currency_code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Currency of every amount on the invoice.","isRequired":true,"uniqueKey":"amounts.currency_code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amounts.currency_code","typeLabel":"string | null"},"excluding_vat":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Invoice total excluding VAT. Null when unknown.","example":"1250.00","isRequired":true,"uniqueKey":"amounts.excluding_vat.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Invoice total excluding VAT. Null when unknown.","example":"1250.00","isRequired":true,"uniqueKey":"amounts.excluding_vat.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amounts.excluding_vat","typeLabel":"string | null"},"including_vat":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Invoice total including VAT. Null when unknown.","example":"1250.00","isRequired":true,"uniqueKey":"amounts.including_vat.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Invoice total including VAT. Null when unknown.","example":"1250.00","isRequired":true,"uniqueKey":"amounts.including_vat.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amounts.including_vat","typeLabel":"string | null"},"prepaid":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Exact decimal as a string. Parse it as a decimal, not a floating-point number.","example":"1250.00","isRequired":true,"uniqueKey":"amounts.prepaid.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Exact decimal as a string. Parse it as a decimal, not a floating-point number.","example":"1250.00","isRequired":true,"uniqueKey":"amounts.prepaid.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amounts.prepaid","typeLabel":"string | null"},"rounding":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Exact decimal as a string. Parse it as a decimal, not a floating-point number.","example":"1250.00","isRequired":true,"uniqueKey":"amounts.rounding.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Exact decimal as a string. Parse it as a decimal, not a floating-point number.","example":"1250.00","isRequired":true,"uniqueKey":"amounts.rounding.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amounts.rounding","typeLabel":"string | null"},"payable":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Amount to pay: including_vat − prepaid + rounding. Null when not read.","example":"1250.00","isRequired":true,"uniqueKey":"amounts.payable.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Amount to pay: including_vat − prepaid + rounding. Null when not read.","example":"1250.00","isRequired":true,"uniqueKey":"amounts.payable.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amounts.payable","typeLabel":"string | null"},"original":{"oneOf":[{"type":"object","properties":{"currency_code":{"type":"string","isRequired":true,"uniqueKey":"amounts.original.oneOf.0.currency_code","typeLabel":"string"},"including_vat":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Exact decimal as a string. Parse it as a decimal, not a floating-point number.","example":"1250.00","isRequired":true,"uniqueKey":"amounts.original.oneOf.0.including_vat.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Exact decimal as a string. Parse it as a decimal, not a floating-point number.","example":"1250.00","isRequired":true,"uniqueKey":"amounts.original.oneOf.0.including_vat.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amounts.original.oneOf.0.including_vat","typeLabel":"string | null"},"conversion_rate":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Units of currency_code per original unit. Null when no rate was recorded.","example":"1250.00","isRequired":true,"uniqueKey":"amounts.original.oneOf.0.conversion_rate.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Units of currency_code per original unit. Null when no rate was recorded.","example":"1250.00","isRequired":true,"uniqueKey":"amounts.original.oneOf.0.conversion_rate.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amounts.original.oneOf.0.conversion_rate","typeLabel":"string | null"}},"required":["currency_code","including_vat","conversion_rate"],"description":"The printed currency and total before conversion; null when none was recorded.","isRequired":true,"uniqueKey":"amounts.original.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"currency_code":{"type":"string"},"including_vat":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Exact decimal as a string. Parse it as a decimal, not a floating-point number.","example":"1250.00"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Exact decimal as a string. Parse it as a decimal, not a floating-point number.","example":"1250.00"}]},"conversion_rate":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Units of currency_code per original unit. Null when no rate was recorded.","example":"1250.00"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Units of currency_code per original unit. Null when no rate was recorded.","example":"1250.00"}]}},"required":["currency_code","including_vat","conversion_rate"],"description":"The printed currency and total before conversion; null when none was recorded.","isRequired":true,"uniqueKey":"amounts.original.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amounts.original","typeLabel":"object | null"},"valid":{"type":"boolean","readOnly":true,"description":"Whether the amounts add up, within 1 currency unit. Says nothing about extraction accuracy or compliance.","isRequired":true,"uniqueKey":"amounts.valid","typeLabel":"boolean"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["missing_financial_inputs","line_calculation_mismatch","invoice_total_mismatch","invoice_subtotal_mismatch","category_amount_mismatch","payable_amount_mismatch"],"isRequired":true,"uniqueKey":"amounts.errors.items.[INDEX].code","typeLabel":"enum\u003cstring>"},"field":{"type":"string","isRequired":true,"uniqueKey":"amounts.errors.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"amounts.errors.items.[INDEX].message","typeLabel":"string"}},"required":["code","field","message"],"uniqueKey":"amounts.errors.items.[INDEX]","typeLabel":"object"},"readOnly":true,"description":"Why valid is false; field is the path of the failing field.","isRequired":true,"uniqueKey":"amounts.errors","typeLabel":"object[]"},"transfer_mismatches":{"type":"array","items":{"type":"string","uniqueKey":"amounts.transfer_mismatches.items.[INDEX]","typeLabel":"string"},"readOnly":true,"description":"The amounts that keep transferInvoice from sending (amounts_mismatch), by path: amounts.payable or amounts.including_vat. Sending needs them to agree exactly, not within 1 unit: payable is including_vat − prepaid + rounding, and including_vat is the lines with VAT within 0.005 per line plus 0.005, or, when the lines add up exactly to excluding_vat, VAT within 0.10 of theirs (or the per-line allowance when more). Empty for an invoice Watchdog never sends: one an accounting system delivered, or one outside the flow.","isRequired":true,"uniqueKey":"amounts.transfer_mismatches","typeLabel":"string[]"}},"required":["currency_code","excluding_vat","including_vat","prepaid","rounding","payable","original","valid","errors","transfer_mismatches"],"isRequired":true,"uniqueKey":"amounts","typeLabel":"object"},"review":{"type":"object","properties":{"recommended":{"type":"boolean","description":"True for unconfirmed low or medium extraction confidence, or amounts that do not add up.","isRequired":true,"uniqueKey":"review.recommended","typeLabel":"boolean"},"extraction_confidence":{"type":"string","enum":["high","mid","low","unknown"],"description":"Confidence in the data extracted from a PDF invoice. unknown for XML, API-created and manually created invoices.","isRequired":true,"uniqueKey":"review.extraction_confidence","typeLabel":"enum\u003cstring>"},"confirmed":{"oneOf":[{"type":"object","properties":{"at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"review.confirmed.oneOf.0.at","typeLabel":"string\u003cdate-time>"},"by_user_id":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"review.confirmed.oneOf.0.by_user_id.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"review.confirmed.oneOf.0.by_user_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"review.confirmed.oneOf.0.by_user_id","typeLabel":"string | null"}},"required":["at","by_user_id"],"description":"True once a person has confirmed the extracted data.","isRequired":true,"uniqueKey":"review.confirmed.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"at":{"type":"string","format":"date-time"},"by_user_id":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["at","by_user_id"],"description":"True once a person has confirmed the extracted data.","isRequired":true,"uniqueKey":"review.confirmed.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"review.confirmed","typeLabel":"object | null"}},"required":["recommended","extraction_confidence","confirmed"],"readOnly":true,"isRequired":true,"uniqueKey":"review","typeLabel":"object"},"stage":{"oneOf":[{"type":"string","enum":["inbox","needs_approval","on_hold","approved","rejected",null],"description":"Superseded by lifecycle, the invoice's one status; removed once the app no longer reads it. Watchdog's approval flow, from Watchdog's facts only: rejected (closed) or approved as decided, on_hold, needs_approval while it has approvers, else inbox. Null outside the flow (see the invoice's outside_flow).","isRequired":true,"uniqueKey":"stage.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["inbox","needs_approval","on_hold","approved","rejected",null],"description":"Superseded by lifecycle, the invoice's one status; removed once the app no longer reads it. Watchdog's approval flow, from Watchdog's facts only: rejected (closed) or approved as decided, on_hold, needs_approval while it has approvers, else inbox. Null outside the flow (see the invoice's outside_flow).","isRequired":true,"uniqueKey":"stage.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"stage","typeLabel":"enum\u003cstring> | null"},"outside_flow":{"oneOf":[{"type":"string","enum":["cancelled_in_source","accounting_history",null],"description":"Superseded by lifecycle; removed once the app no longer reads it. Why stage is null: cancelled_in_source (its accounting system cancelled it), or accounting_history (marked as history on arrival; new arrivals qualify through posted rows or a settled source balance, not source approval).","isRequired":true,"uniqueKey":"outside_flow.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["cancelled_in_source","accounting_history",null],"description":"Superseded by lifecycle; removed once the app no longer reads it. Why stage is null: cancelled_in_source (its accounting system cancelled it), or accounting_history (marked as history on arrival; new arrivals qualify through posted rows or a settled source balance, not source approval).","isRequired":true,"uniqueKey":"outside_flow.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"outside_flow","typeLabel":"enum\u003cstring> | null"},"lifecycle":{"type":"object","properties":{"status":{"oneOf":[{"type":"string","enum":["reading","missing_info","ready_for_approval","no_new_charges","sent_back","awaiting_approval","on_hold","not_ready_to_send","ready_to_send","send_failed","rejected_in_accounting","sent","awaiting_payment","paid","booked","closed","cancelled",null],"description":"Where the invoice is in its life, as one status. Inbox, a draft: reading (Watchdog is still working on it), missing_info (something must be fixed before it is sent for approval; see blockers), ready_for_approval (ready to send for approval with send_for_approval: one a person worked on, one with review_issues, or without approvers), sent_back (an approver sent it back to be fixed; see sent_back), no_new_charges (a letter that adds no charge of its own: what it asks is paid through the invoices and letters it chases, so it is never approved; a person completes it with close). Approval, once sent: awaiting_approval, on_hold. Payment: not_ready_to_send (sending would be refused now; see blockers), ready_to_send, send_failed, rejected_in_accounting (rejected in the accounting system's own approval after it was sent), sent (in the accounting system, not booked yet), awaiting_payment (booked there, not paid). Done: paid (the accounting system states nothing outstanding, or payment.paid_mark), booked (a credit note booked there), closed (in Watchdog, without payment; a reopen undoes it), cancelled (in its source). Watchdog sends a clean arrival with approvers and no review_issues itself. Once sent, an invoice stays in Approval whatever happens to it until it is reopened or sent back, and approving it is never blocked; it follows its accounting system wherever it came from. Null for a deleted invoice.","isRequired":true,"uniqueKey":"lifecycle.status.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["reading","missing_info","ready_for_approval","no_new_charges","sent_back","awaiting_approval","on_hold","not_ready_to_send","ready_to_send","send_failed","rejected_in_accounting","sent","awaiting_payment","paid","booked","closed","cancelled",null],"description":"Where the invoice is in its life, as one status. Inbox, a draft: reading (Watchdog is still working on it), missing_info (something must be fixed before it is sent for approval; see blockers), ready_for_approval (ready to send for approval with send_for_approval: one a person worked on, one with review_issues, or without approvers), sent_back (an approver sent it back to be fixed; see sent_back), no_new_charges (a letter that adds no charge of its own: what it asks is paid through the invoices and letters it chases, so it is never approved; a person completes it with close). Approval, once sent: awaiting_approval, on_hold. Payment: not_ready_to_send (sending would be refused now; see blockers), ready_to_send, send_failed, rejected_in_accounting (rejected in the accounting system's own approval after it was sent), sent (in the accounting system, not booked yet), awaiting_payment (booked there, not paid). Done: paid (the accounting system states nothing outstanding, or payment.paid_mark), booked (a credit note booked there), closed (in Watchdog, without payment; a reopen undoes it), cancelled (in its source). Watchdog sends a clean arrival with approvers and no review_issues itself. Once sent, an invoice stays in Approval whatever happens to it until it is reopened or sent back, and approving it is never blocked; it follows its accounting system wherever it came from. Null for a deleted invoice.","isRequired":true,"uniqueKey":"lifecycle.status.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lifecycle.status","typeLabel":"enum\u003cstring> | null"},"phase":{"oneOf":[{"type":"string","enum":["inbox","approval","payment","done",null],"description":"The phase of status: inbox, approval, payment or done. Null with status.","isRequired":true,"uniqueKey":"lifecycle.phase.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["inbox","approval","payment","done",null],"description":"The phase of status: inbox, approval, payment or done. Null with status.","isRequired":true,"uniqueKey":"lifecycle.phase.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lifecycle.phase","typeLabel":"enum\u003cstring> | null"},"blockers":{"type":"array","items":{"type":"string","enum":["no_company","no_supplier","uncoded_lines","supplier_not_in_erp","not_coded","no_connection","connection_disabled","sign_in_missing","sign_in_expired","currency_unsupported"],"uniqueKey":"lifecycle.blockers.items.[INDEX]","typeLabel":"enum\u003cstring>"},"description":"Why the invoice waits: for missing_info, and while reading or sent_back, what holds it in Inbox: no_company, uncoded_lines (its coding is not complete and valid), supplier_not_in_erp (its supplier is not in the accounting system its company sends to: create it there with createErpSupplier or link it with linkErpSupplier, since Watchdog never adds it on its own). Sending it for approval is refused while any of these applies. For not_ready_to_send, the reason sending to the accounting system would be refused (send_to.blocked), such as not_coded when the accounting system no longer accepts its coding, or supplier_not_in_erp. Empty otherwise.","isRequired":true,"uniqueKey":"lifecycle.blockers","typeLabel":"enum\u003cstring>[]"},"review_issues":{"type":"array","items":{"type":"string","enum":["needs_review","letter_missing_original","letter_reading_attention"],"uniqueKey":"lifecycle.review_issues.items.[INDEX]","typeLabel":"enum\u003cstring>"},"description":"While it is decided, in Inbox and Approval, what a person should check, never holding it: needs_review (its reading or amounts are unsure; see review and amounts.errors), letter_missing_original (a claim with no linked invoice), letter_reading_attention (see letter.issues). Fixing the data clears it.","isRequired":true,"uniqueKey":"lifecycle.review_issues","typeLabel":"enum\u003cstring>[]"},"closed_on":{"oneOf":[{"type":"string","format":"date","description":"When it reached Done (Oslo date): paid on, a credit note paid or booked on, closed on. Null before Done and for a cancellation.","isRequired":true,"uniqueKey":"lifecycle.closed_on.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","format":"date","description":"When it reached Done (Oslo date): paid on, a credit note paid or booked on, closed on. Null before Done and for a cancellation.","isRequired":true,"uniqueKey":"lifecycle.closed_on.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lifecycle.closed_on","typeLabel":"string\u003cdate> | null"},"next_action":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["review","choose_approvers","send_for_approval","complete","approve","assess","release_hold","send","retry","resolve_rejection"],"description":"review (fix what is missing or stops the send), choose_approvers, send_for_approval (updateInvoice with send_for_approval), complete (a letter with no new charges: checked, then closed with updateInvoice close), approve, assess (approve, with open avvik to look at first), release_hold, send (to the accounting system), retry, resolve_rejection (send again or reject in Watchdog).","isRequired":true,"uniqueKey":"lifecycle.next_action.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"mine":{"type":"boolean","description":"The caller is one who takes this action.","isRequired":true,"uniqueKey":"lifecycle.next_action.oneOf.0.mine","typeLabel":"boolean"},"waiting_on":{"type":"array","items":{"type":"string","uniqueKey":"lifecycle.next_action.oneOf.0.waiting_on.items.[INDEX]","typeLabel":"string"},"description":"User IDs the action waits on when it is not the caller's: the approvers yet to approve, or who put it on hold. Empty when it falls to the workspace's admins.","isRequired":true,"uniqueKey":"lifecycle.next_action.oneOf.0.waiting_on","typeLabel":"string[]"}},"required":["kind","mine","waiting_on"],"description":"What moves the invoice on from its status, and whose move it is. Null when nobody in Watchdog has anything to do.","isRequired":true,"uniqueKey":"lifecycle.next_action.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"kind":{"type":"string","enum":["review","choose_approvers","send_for_approval","complete","approve","assess","release_hold","send","retry","resolve_rejection"],"description":"review (fix what is missing or stops the send), choose_approvers, send_for_approval (updateInvoice with send_for_approval), complete (a letter with no new charges: checked, then closed with updateInvoice close), approve, assess (approve, with open avvik to look at first), release_hold, send (to the accounting system), retry, resolve_rejection (send again or reject in Watchdog)."},"mine":{"type":"boolean","description":"The caller is one who takes this action."},"waiting_on":{"type":"array","items":{"type":"string"},"description":"User IDs the action waits on when it is not the caller's: the approvers yet to approve, or who put it on hold. Empty when it falls to the workspace's admins."}},"required":["kind","mine","waiting_on"],"description":"What moves the invoice on from its status, and whose move it is. Null when nobody in Watchdog has anything to do.","isRequired":true,"uniqueKey":"lifecycle.next_action.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lifecycle.next_action","typeLabel":"object | null"}},"required":["status","phase","blockers","review_issues","closed_on","next_action"],"description":"The invoice's lifecycle, the one status every screen shows. Filter with phase, lifecycle_statuses and actionable; count with GET /v1/invoices/lifecycle-counts.","isRequired":true,"uniqueKey":"lifecycle","typeLabel":"object"},"accounting":{"type":"object","properties":{"system_name":{"oneOf":[{"type":"string","description":"The accounting system holding a copy, such as Tripletex; null when none.","isRequired":true,"uniqueKey":"accounting.system_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The accounting system holding a copy, such as Tripletex; null when none.","isRequired":true,"uniqueKey":"accounting.system_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"accounting.system_name","typeLabel":"string | null"},"link":{"oneOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Opens it in the accounting system's web app, for someone signed in there.","isRequired":true,"uniqueKey":"accounting.link.oneOf.0.url","typeLabel":"string\u003curi>"},"system_name":{"oneOf":[{"type":"string","description":"That accounting system, such as Tripletex.","isRequired":true,"uniqueKey":"accounting.link.oneOf.0.system_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"That accounting system, such as Tripletex.","isRequired":true,"uniqueKey":"accounting.link.oneOf.0.system_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"accounting.link.oneOf.0.system_name","typeLabel":"string | null"}},"required":["url","system_name"],"description":"Where the invoice opens in an accounting system: its copy there (sent by Watchdog or delivered by that system), else the voucher that booked it. Null when neither has a web address Watchdog knows for that system or connection, and before it is in one.","isRequired":true,"uniqueKey":"accounting.link.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"url":{"type":"string","format":"uri","description":"Opens it in the accounting system's web app, for someone signed in there."},"system_name":{"oneOf":[{"type":"string","description":"That accounting system, such as Tripletex."},{"type":"null","description":"That accounting system, such as Tripletex."}]}},"required":["url","system_name"],"description":"Where the invoice opens in an accounting system: its copy there (sent by Watchdog or delivered by that system), else the voucher that booked it. Null when neither has a web address Watchdog knows for that system or connection, and before it is in one.","isRequired":true,"uniqueKey":"accounting.link.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"accounting.link","typeLabel":"object | null"},"approval":{"oneOf":[{"type":"string","enum":["approved","rejected","pending",null],"description":"That system's own approval; null when it states none. Tripletex states it only for an invoice Watchdog sent, read nightly until it is booked.","isRequired":true,"uniqueKey":"accounting.approval.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["approved","rejected","pending",null],"description":"That system's own approval; null when it states none. Tripletex states it only for an invoice Watchdog sent, read nightly until it is booked.","isRequired":true,"uniqueKey":"accounting.approval.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"accounting.approval","typeLabel":"enum\u003cstring> | null"},"rejection":{"oneOf":[{"type":"object","properties":{"by":{"oneOf":[{"type":"string","description":"Who rejected it, as that system names them; null when it hides the name.","isRequired":true,"uniqueKey":"accounting.rejection.oneOf.0.by.oneOf.0","typeLabel":"string"},{"type":"null","description":"Who rejected it, as that system names them; null when it hides the name.","isRequired":true,"uniqueKey":"accounting.rejection.oneOf.0.by.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"accounting.rejection.oneOf.0.by","typeLabel":"string | null"},"role":{"oneOf":[{"type":"string","description":"Their part in that system's approval, such as department manager, as it names it; null when it does not.","isRequired":true,"uniqueKey":"accounting.rejection.oneOf.0.role.oneOf.0","typeLabel":"string"},{"type":"null","description":"Their part in that system's approval, such as department manager, as it names it; null when it does not.","isRequired":true,"uniqueKey":"accounting.rejection.oneOf.0.role.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"accounting.rejection.oneOf.0.role","typeLabel":"string | null"},"comment":{"oneOf":[{"type":"string","description":"Why, as they wrote it; null when they wrote nothing.","isRequired":true,"uniqueKey":"accounting.rejection.oneOf.0.comment.oneOf.0","typeLabel":"string"},{"type":"null","description":"Why, as they wrote it; null when they wrote nothing.","isRequired":true,"uniqueKey":"accounting.rejection.oneOf.0.comment.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"accounting.rejection.oneOf.0.comment","typeLabel":"string | null"}},"required":["by","role","comment"],"description":"While approval is rejected: who rejected it there and why, each null where that system does not say. Null otherwise.","isRequired":true,"uniqueKey":"accounting.rejection.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"by":{"oneOf":[{"type":"string","description":"Who rejected it, as that system names them; null when it hides the name."},{"type":"null","description":"Who rejected it, as that system names them; null when it hides the name."}]},"role":{"oneOf":[{"type":"string","description":"Their part in that system's approval, such as department manager, as it names it; null when it does not."},{"type":"null","description":"Their part in that system's approval, such as department manager, as it names it; null when it does not."}]},"comment":{"oneOf":[{"type":"string","description":"Why, as they wrote it; null when they wrote nothing."},{"type":"null","description":"Why, as they wrote it; null when they wrote nothing."}]}},"required":["by","role","comment"],"description":"While approval is rejected: who rejected it there and why, each null where that system does not say. Null otherwise.","isRequired":true,"uniqueKey":"accounting.rejection.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"accounting.rejection","typeLabel":"object | null"},"booking":{"oneOf":[{"type":"object","properties":{"system_name":{"oneOf":[{"type":"string","description":"The accounting system that booked it; null for an ERP imported without a connection.","isRequired":true,"uniqueKey":"accounting.booking.oneOf.0.system_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The accounting system that booked it; null for an ERP imported without a connection.","isRequired":true,"uniqueKey":"accounting.booking.oneOf.0.system_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"accounting.booking.oneOf.0.system_name","typeLabel":"string | null"}},"required":["system_name"],"description":"Set once an accounting system booked it (Eye-Share: transferred), naming that system, which can differ from system_name. Rows are under voucher.","isRequired":true,"uniqueKey":"accounting.booking.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"system_name":{"oneOf":[{"type":"string","description":"The accounting system that booked it; null for an ERP imported without a connection."},{"type":"null","description":"The accounting system that booked it; null for an ERP imported without a connection."}]}},"required":["system_name"],"description":"Set once an accounting system booked it (Eye-Share: transferred), naming that system, which can differ from system_name. Rows are under voucher.","isRequired":true,"uniqueKey":"accounting.booking.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"accounting.booking","typeLabel":"object | null"},"not_booked":{"type":"boolean","description":"Watchdog sent it to be booked, and the accounting system did not book it.","isRequired":true,"uniqueKey":"accounting.not_booked","typeLabel":"boolean"},"status":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["paid","booked","rejected","pending","not_booked","sent","approved"],"description":"The first that holds of: paid there, booked there, rejected in its own approval there, and sent by Watchdog and waiting (pending while it waits for approval there, not_booked when it did not book it although asked to, else sent). An invoice Watchdog did not send shows that system's approval (approved, pending).","isRequired":true,"uniqueKey":"accounting.status.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"system_name":{"oneOf":[{"type":"string","description":"The system the status is about: the one that booked it once booked, else the one holding its copy; null when unnamed.","isRequired":true,"uniqueKey":"accounting.status.oneOf.0.system_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The system the status is about: the one that booked it once booked, else the one holding its copy; null when unnamed.","isRequired":true,"uniqueKey":"accounting.status.oneOf.0.system_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"accounting.status.oneOf.0.system_name","typeLabel":"string | null"},"sent_at":{"oneOf":[{"type":"string","format":"date-time","description":"When Watchdog sent it, while the status is sent, pending or not_booked; null otherwise.","isRequired":true,"uniqueKey":"accounting.status.oneOf.0.sent_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When Watchdog sent it, while the status is sent, pending or not_booked; null otherwise.","isRequired":true,"uniqueKey":"accounting.status.oneOf.0.sent_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"accounting.status.oneOf.0.sent_at","typeLabel":"string\u003cdate-time> | null"}},"required":["kind","system_name","sent_at"],"description":"Where the invoice stands in its accounting system, as one status from sent to paid. Null when none holds, and after a failed send, whose reason is under transfer. The invoice and the transfer_stuck filter decide it alike.","isRequired":true,"uniqueKey":"accounting.status.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"kind":{"type":"string","enum":["paid","booked","rejected","pending","not_booked","sent","approved"],"description":"The first that holds of: paid there, booked there, rejected in its own approval there, and sent by Watchdog and waiting (pending while it waits for approval there, not_booked when it did not book it although asked to, else sent). An invoice Watchdog did not send shows that system's approval (approved, pending)."},"system_name":{"oneOf":[{"type":"string","description":"The system the status is about: the one that booked it once booked, else the one holding its copy; null when unnamed."},{"type":"null","description":"The system the status is about: the one that booked it once booked, else the one holding its copy; null when unnamed."}]},"sent_at":{"oneOf":[{"type":"string","format":"date-time","description":"When Watchdog sent it, while the status is sent, pending or not_booked; null otherwise."},{"type":"null","format":"date-time","description":"When Watchdog sent it, while the status is sent, pending or not_booked; null otherwise."}]}},"required":["kind","system_name","sent_at"],"description":"Where the invoice stands in its accounting system, as one status from sent to paid. Null when none holds, and after a failed send, whose reason is under transfer. The invoice and the transfer_stuck filter decide it alike.","isRequired":true,"uniqueKey":"accounting.status.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"accounting.status","typeLabel":"object | null"}},"required":["system_name","link","approval","rejection","booking","not_booked","status"],"description":"The accounting system's own state of the invoice, apart from Watchdog's approval. Payment is under payment.","isRequired":true,"uniqueKey":"accounting","typeLabel":"object"},"overdue":{"type":"boolean","description":"True when it still waits on Watchdog past its due date (Oslo date): its lifecycle.status is in Inbox or Approval, or it is approved and not yet sent (not_ready_to_send, ready_to_send, send_failed). Once it is in the accounting system or done, it is not overdue.","isRequired":true,"uniqueKey":"overdue","typeLabel":"boolean"},"approvers":{"type":"array","items":{"type":"object","required":["step","user_id","first_name","last_name","email","approved","source","rule_id","rule_name","purchase_order","added_by"],"properties":{"user_id":{"type":"string","isRequired":true,"uniqueKey":"approvers.items.[INDEX].user_id","typeLabel":"string"},"first_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approvers.items.[INDEX].first_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approvers.items.[INDEX].first_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approvers.items.[INDEX].first_name","typeLabel":"string | null"},"last_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approvers.items.[INDEX].last_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approvers.items.[INDEX].last_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approvers.items.[INDEX].last_name","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approvers.items.[INDEX].email.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approvers.items.[INDEX].email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approvers.items.[INDEX].email","typeLabel":"string | null"},"approved":{"type":"boolean","description":"This approver approved the invoice's current approval round. Several can have approved while the invoice waits for required_approvals.","isRequired":true,"uniqueKey":"approvers.items.[INDEX].approved","typeLabel":"boolean"},"source":{"type":"string","enum":["person","rule","purchase_order"],"description":"Who added the approver: a rule, an order the invoice bills, or a person.","isRequired":true,"uniqueKey":"approvers.items.[INDEX].source","typeLabel":"enum\u003cstring>"},"rule_id":{"oneOf":[{"type":"string","format":"uuid","description":"The rule that added the approver, if one did.","isRequired":true,"uniqueKey":"approvers.items.[INDEX].rule_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The rule that added the approver, if one did.","isRequired":true,"uniqueKey":"approvers.items.[INDEX].rule_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approvers.items.[INDEX].rule_id","typeLabel":"string\u003cuuid> | null"},"rule_name":{"oneOf":[{"type":"string","description":"The rule's name; null if none or deleted.","isRequired":true,"uniqueKey":"approvers.items.[INDEX].rule_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The rule's name; null if none or deleted.","isRequired":true,"uniqueKey":"approvers.items.[INDEX].rule_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approvers.items.[INDEX].rule_name","typeLabel":"string | null"},"purchase_order":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"approvers.items.[INDEX].purchase_order.oneOf.0.id","typeLabel":"string\u003cuuid>"},"number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approvers.items.[INDEX].purchase_order.oneOf.0.number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approvers.items.[INDEX].purchase_order.oneOf.0.number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approvers.items.[INDEX].purchase_order.oneOf.0.number","typeLabel":"string | null"}},"required":["id","number"],"description":"The purchase order whose invoice approvers added it (source purchase_order); null otherwise, or when the order is deleted or hidden from you.","isRequired":true,"uniqueKey":"approvers.items.[INDEX].purchase_order.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"id":{"type":"string","format":"uuid"},"number":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["id","number"],"description":"The purchase order whose invoice approvers added it (source purchase_order); null otherwise, or when the order is deleted or hidden from you.","isRequired":true,"uniqueKey":"approvers.items.[INDEX].purchase_order.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approvers.items.[INDEX].purchase_order","typeLabel":"object | null"},"added_by":{"oneOf":[{"type":"object","description":"The person who added the approver by hand; null for a rule, or when not recorded.","required":["user_id","first_name","last_name","email"],"properties":{"user_id":{"type":"string","isRequired":true,"uniqueKey":"approvers.items.[INDEX].added_by.oneOf.0.user_id","typeLabel":"string"},"first_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approvers.items.[INDEX].added_by.oneOf.0.first_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approvers.items.[INDEX].added_by.oneOf.0.first_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approvers.items.[INDEX].added_by.oneOf.0.first_name","typeLabel":"string | null"},"last_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approvers.items.[INDEX].added_by.oneOf.0.last_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approvers.items.[INDEX].added_by.oneOf.0.last_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approvers.items.[INDEX].added_by.oneOf.0.last_name","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approvers.items.[INDEX].added_by.oneOf.0.email.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approvers.items.[INDEX].added_by.oneOf.0.email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approvers.items.[INDEX].added_by.oneOf.0.email","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"approvers.items.[INDEX].added_by.oneOf.0","typeLabel":"object"},{"type":"null","description":"The person who added the approver by hand; null for a rule, or when not recorded.","required":["user_id","first_name","last_name","email"],"properties":{"user_id":{"type":"string"},"first_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"email":{"oneOf":[{"type":"string"},{"type":"null"}]}},"isRequired":true,"uniqueKey":"approvers.items.[INDEX].added_by.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approvers.items.[INDEX].added_by","typeLabel":"object | null"},"step":{"type":"integer","minimum":1,"description":"The approval step the approver is in, 1 first (WD-2901). Steps set only the order: one approval completes a step and the next step's turn begins; the invoice is approved once required_approvals approvers have approved, in whichever step. Edit with setInvoiceApprovalSteps.","isRequired":true,"uniqueKey":"approvers.items.[INDEX].step","typeLabel":"integer"}},"uniqueKey":"approvers.items.[INDEX]","typeLabel":"object"},"description":"The people asked to approve the invoice, in the order they were added.","isRequired":true,"uniqueKey":"approvers","typeLabel":"object[]"},"approver_teams":{"type":"array","items":{"type":"object","required":["nobody_can_act","step","team_id","name","approved","approved_by","source","rule_id","rule_name","purchase_order","added_by","members"],"properties":{"team_id":{"oneOf":[{"type":"string","format":"uuid","description":"Null when the team has been deleted since it decided.","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].team_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"Null when the team has been deleted since it decided.","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].team_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].team_id","typeLabel":"string\u003cuuid> | null"},"name":{"oneOf":[{"type":"string","description":"Null when the team has been deleted since it decided.","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Null when the team has been deleted since it decided.","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].name","typeLabel":"string | null"},"approved":{"type":"boolean","description":"Someone approved for this team in the invoice's current approval round.","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].approved","typeLabel":"boolean"},"approved_by":{"oneOf":[{"type":"object","description":"Who approved for the team; null until someone has.","required":["user_id","first_name","last_name","email"],"properties":{"user_id":{"type":"string","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].approved_by.oneOf.0.user_id","typeLabel":"string"},"first_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].approved_by.oneOf.0.first_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].approved_by.oneOf.0.first_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].approved_by.oneOf.0.first_name","typeLabel":"string | null"},"last_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].approved_by.oneOf.0.last_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].approved_by.oneOf.0.last_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].approved_by.oneOf.0.last_name","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].approved_by.oneOf.0.email.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].approved_by.oneOf.0.email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].approved_by.oneOf.0.email","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].approved_by.oneOf.0","typeLabel":"object"},{"type":"null","description":"Who approved for the team; null until someone has.","required":["user_id","first_name","last_name","email"],"properties":{"user_id":{"type":"string"},"first_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"email":{"oneOf":[{"type":"string"},{"type":"null"}]}},"isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].approved_by.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].approved_by","typeLabel":"object | null"},"source":{"type":"string","enum":["person","rule","purchase_order"],"description":"Who added the team: a rule, an order the invoice bills, or a person.","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].source","typeLabel":"enum\u003cstring>"},"rule_id":{"oneOf":[{"type":"string","format":"uuid","description":"The rule that added the team, if one did.","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].rule_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The rule that added the team, if one did.","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].rule_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].rule_id","typeLabel":"string\u003cuuid> | null"},"rule_name":{"oneOf":[{"type":"string","description":"The rule's name; null if none or deleted.","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].rule_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The rule's name; null if none or deleted.","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].rule_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].rule_name","typeLabel":"string | null"},"purchase_order":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].purchase_order.oneOf.0.id","typeLabel":"string\u003cuuid>"},"number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].purchase_order.oneOf.0.number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].purchase_order.oneOf.0.number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].purchase_order.oneOf.0.number","typeLabel":"string | null"}},"required":["id","number"],"description":"The purchase order whose invoice approvers added it (source purchase_order); null otherwise, or when the order is deleted or hidden from you.","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].purchase_order.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"id":{"type":"string","format":"uuid"},"number":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["id","number"],"description":"The purchase order whose invoice approvers added it (source purchase_order); null otherwise, or when the order is deleted or hidden from you.","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].purchase_order.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].purchase_order","typeLabel":"object | null"},"added_by":{"oneOf":[{"type":"object","description":"The person who added the team by hand; null for a rule, or when not recorded.","required":["user_id","first_name","last_name","email"],"properties":{"user_id":{"type":"string","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].added_by.oneOf.0.user_id","typeLabel":"string"},"first_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].added_by.oneOf.0.first_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].added_by.oneOf.0.first_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].added_by.oneOf.0.first_name","typeLabel":"string | null"},"last_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].added_by.oneOf.0.last_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].added_by.oneOf.0.last_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].added_by.oneOf.0.last_name","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].added_by.oneOf.0.email.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].added_by.oneOf.0.email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].added_by.oneOf.0.email","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].added_by.oneOf.0","typeLabel":"object"},{"type":"null","description":"The person who added the team by hand; null for a rule, or when not recorded.","required":["user_id","first_name","last_name","email"],"properties":{"user_id":{"type":"string"},"first_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"email":{"oneOf":[{"type":"string"},{"type":"null"}]}},"isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].added_by.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].added_by","typeLabel":"object | null"},"members":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].members.items.[INDEX].user_id","typeLabel":"string"},"first_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].members.items.[INDEX].first_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].members.items.[INDEX].first_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].members.items.[INDEX].first_name","typeLabel":"string | null"},"last_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].members.items.[INDEX].last_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].members.items.[INDEX].last_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].members.items.[INDEX].last_name","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].members.items.[INDEX].email.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].members.items.[INDEX].email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].members.items.[INDEX].email","typeLabel":"string | null"}},"required":["user_id","first_name","last_name","email"],"uniqueKey":"approver_teams.items.[INDEX].members.items.[INDEX]","typeLabel":"object"},"description":"Who is in the team now. Any of them with write access who can see the invoice may decide for it; the team counts as one approver.","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].members","typeLabel":"object[]"},"nobody_can_act":{"type":"boolean","description":"Nobody in the team can approve the invoice now: no member has write access and can see it. Add someone to the team, or add another approver. False once the team has approved or the invoice is decided, and in exports.","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].nobody_can_act","typeLabel":"boolean"},"step":{"type":"integer","minimum":1,"description":"The approval step the approver is in, 1 first (WD-2901). Steps set only the order: one approval completes a step and the next step's turn begins; the invoice is approved once required_approvals approvers have approved, in whichever step. Edit with setInvoiceApprovalSteps.","isRequired":true,"uniqueKey":"approver_teams.items.[INDEX].step","typeLabel":"integer"}},"uniqueKey":"approver_teams.items.[INDEX]","typeLabel":"object"},"description":"The teams asked to approve the invoice, in the order they were added. Each counts as one approver toward required_approvals.","isRequired":true,"uniqueKey":"approver_teams","typeLabel":"object[]"},"required_approvals":{"type":"integer","minimum":1,"description":"How many approvers must approve the invoice: the organization's approval policy setting, however many approval steps it has. With fewer approvers than this, add more before it can be approved.","isRequired":true,"uniqueKey":"required_approvals","typeLabel":"integer"},"assigning_approvers":{"type":"boolean","description":"Approvers come once it is read, matched to its orders and coded: its orders' invoice approvers, else rules.","isRequired":true,"uniqueKey":"assigning_approvers","typeLabel":"boolean"},"policy_approval":{"oneOf":[{"type":"string","enum":["waiting","decided",null],"description":"The approval policy decides instead of people: waiting (not evaluated yet, no approvers) or decided. Null when people decide.","isRequired":true,"uniqueKey":"policy_approval.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["waiting","decided",null],"description":"The approval policy decides instead of people: waiting (not evaluated yet, no approvers) or decided. Null when people decide.","isRequired":true,"uniqueKey":"policy_approval.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"policy_approval","typeLabel":"enum\u003cstring> | null"},"background_runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The run. Retry an unsuccessful one with retryWorkflowRun.","isRequired":true,"uniqueKey":"background_runs.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"area":{"type":"string","enum":["agreements","credit_notes","purchase_orders"],"description":"agreements: smart matching, then the invoice's first agreement checks. credit_notes: matching a credit note to the invoices it credits, allocating its lines, then recording what settles a claim. purchase_orders: matching the invoice to an order, then its lines to the order's lines.","isRequired":true,"uniqueKey":"background_runs.items.[INDEX].area","typeLabel":"enum\u003cstring>"},"status":{"type":"string","enum":["queued","running","completed","completed_with_errors","failed","cancelled"],"isRequired":true,"uniqueKey":"background_runs.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"failed_steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","enum":["smart_match","initial_checks","match","recover","allocate","match_order","allocate_lines"],"isRequired":true,"uniqueKey":"background_runs.items.[INDEX].failed_steps.items.[INDEX].step","typeLabel":"enum\u003cstring>"},"failure":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100,"isRequired":true,"uniqueKey":"background_runs.items.[INDEX].failed_steps.items.[INDEX].failure.code","typeLabel":"string"},"message":{"type":"string","minLength":1,"maxLength":2000,"isRequired":true,"uniqueKey":"background_runs.items.[INDEX].failed_steps.items.[INDEX].failure.message","typeLabel":"string"}},"required":["code","message"],"isRequired":true,"uniqueKey":"background_runs.items.[INDEX].failed_steps.items.[INDEX].failure","typeLabel":"object"}},"required":["step","failure"],"uniqueKey":"background_runs.items.[INDEX].failed_steps.items.[INDEX]","typeLabel":"object"},"description":"The steps that failed, and why.","isRequired":true,"uniqueKey":"background_runs.items.[INDEX].failed_steps","typeLabel":"object[]"},"waiting_for_import":{"type":"boolean","description":"True while the run waits for the sync or import batch that delivered the invoice to finish, or for a purchase-order sync whose orders it may bill and every order matching run that sync started.","isRequired":true,"uniqueKey":"background_runs.items.[INDEX].waiting_for_import","typeLabel":"boolean"},"retry_at":{"oneOf":[{"type":"string","format":"date-time","description":"When the unsuccessful run retries itself; null when it does not, as when its retries are spent and it needs a person to retry it.","isRequired":true,"uniqueKey":"background_runs.items.[INDEX].retry_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the unsuccessful run retries itself; null when it does not, as when its retries are spent and it needs a person to retry it.","isRequired":true,"uniqueKey":"background_runs.items.[INDEX].retry_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"background_runs.items.[INDEX].retry_at","typeLabel":"string\u003cdate-time> | null"},"finished_at":{"oneOf":[{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"background_runs.items.[INDEX].finished_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","isRequired":true,"uniqueKey":"background_runs.items.[INDEX].finished_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"background_runs.items.[INDEX].finished_at","typeLabel":"string\u003cdate-time> | null"}},"required":["id","area","status","failed_steps","waiting_for_import","retry_at","finished_at"],"description":"The latest run of one of the invoice's background areas: the model work a change of the invoice owes. A change requests the areas it affects; a request joins the area's open run.","uniqueKey":"background_runs.items.[INDEX]","typeLabel":"object"},"description":"The latest run of each background area the invoice has had. Poll check_progress until it is no longer running, then read alerts and checks.","isRequired":true,"uniqueKey":"background_runs","typeLabel":"object[]"},"alerts":{"type":"object","properties":{"status":{"type":"string","enum":["credited","checking","has_issues","clean","not_checked"],"description":"Overall alert status over the checks in scope (see check_status): credited (covered by credit notes), checking (a check is running; results may change), has_issues (open alerts), clean (a check completed, no open alerts), or not_checked.","isRequired":true,"uniqueKey":"alerts.status","typeLabel":"enum\u003cstring>"},"check_status":{"type":"string","enum":["not_checkable","checking","not_checked","completed","incomplete"],"description":"How complete the checks in scope are: completed (every check completed), incomplete (some unchecked, failed or cancelled), checking, not_checked, or not_checkable (credit notes, letters, invoices fully reversed by a credit note, invoices without a document). The invoice scope covers every check that applies to the invoice: its matched agreements, the purchase orders it bills, and its duplicate check. The selected_agreements scope covers the checks against those agreements.","isRequired":true,"uniqueKey":"alerts.check_status","typeLabel":"enum\u003cstring>"},"open_alert_count":{"type":"integer","minimum":0,"description":"Open alerts in scope: live, and neither a false alarm, unsure nor credited.","isRequired":true,"uniqueKey":"alerts.open_alert_count","typeLabel":"integer"},"counts":{"type":"object","properties":{"pending":{"type":"object","properties":{"credited":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"alerts.counts.pending.credited","typeLabel":"integer"},"uncredited":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"alerts.counts.pending.uncredited","typeLabel":"integer"}},"required":["credited","uncredited"],"isRequired":true,"uniqueKey":"alerts.counts.pending","typeLabel":"object"},"accepted":{"type":"object","properties":{"credited":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"alerts.counts.accepted.credited","typeLabel":"integer"},"uncredited":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"alerts.counts.accepted.uncredited","typeLabel":"integer"}},"required":["credited","uncredited"],"isRequired":true,"uniqueKey":"alerts.counts.accepted","typeLabel":"object"},"dismissed":{"type":"object","properties":{"credited":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"alerts.counts.dismissed.credited","typeLabel":"integer"},"uncredited":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"alerts.counts.dismissed.uncredited","typeLabel":"integer"}},"required":["credited","uncredited"],"isRequired":true,"uniqueKey":"alerts.counts.dismissed","typeLabel":"object"},"skipped":{"type":"object","properties":{"credited":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"alerts.counts.skipped.credited","typeLabel":"integer"},"uncredited":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"alerts.counts.skipped.uncredited","typeLabel":"integer"}},"required":["credited","uncredited"],"isRequired":true,"uniqueKey":"alerts.counts.skipped","typeLabel":"object"}},"required":["pending","accepted","dismissed","skipped"],"description":"Alerts by verdict and credit, including false alarms and unsure ones.","isRequired":true,"uniqueKey":"alerts.counts","typeLabel":"object"},"replaceable_alert_count":{"type":"integer","minimum":0,"description":"Alerts in counts that checking the invoice again can replace, whatever their verdict: all but those on an agreement a claim holds for this invoice (a claim that is not cancelled with one of the pair's alerts that is not a false alarm). A check that completes closes them as replaced and opens its findings as new alerts to review.","isRequired":true,"uniqueKey":"alerts.replaceable_alert_count","typeLabel":"integer"},"agreements":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"description":"Currently matched agreements in scope.","isRequired":true,"uniqueKey":"alerts.agreements.total","typeLabel":"integer"},"checked":{"type":"integer","minimum":0,"description":"Matched agreements in scope with a completed check.","isRequired":true,"uniqueKey":"alerts.agreements.checked","typeLabel":"integer"}},"required":["total","checked"],"description":"The matched agreements the checks cover.","isRequired":true,"uniqueKey":"alerts.agreements","typeLabel":"object"},"scope":{"type":"object","properties":{"type":{"type":"string","enum":["invoice","selected_agreements"],"description":"invoice covers all checks and alerts; selected_agreements covers only the selected agreements.","isRequired":true,"uniqueKey":"alerts.scope.type","typeLabel":"enum\u003cstring>"},"agreement_ids":{"oneOf":[{"type":"array","items":{"type":"string","format":"uuid","uniqueKey":"alerts.scope.agreement_ids.oneOf.0.items.[INDEX]","typeLabel":"string\u003cuuid>"},"maxItems":50,"description":"The selected agreements; null for the invoice scope.","isRequired":true,"uniqueKey":"alerts.scope.agreement_ids.oneOf.0","typeLabel":"string\u003cuuid>[]"},{"type":"null","items":{"type":"string","format":"uuid"},"maxItems":50,"description":"The selected agreements; null for the invoice scope.","isRequired":true,"uniqueKey":"alerts.scope.agreement_ids.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"alerts.scope.agreement_ids","typeLabel":"string\u003cuuid>[] | null"}},"required":["type","agreement_ids"],"description":"The scope of counts and agreements.","isRequired":true,"uniqueKey":"alerts.scope","typeLabel":"object"},"has_hidden_alerts":{"type":"boolean","description":"True when a team-restricted caller cannot see some live alerts on the invoice because their agreement is hidden. Always false for Admins and unrestricted callers.","isRequired":true,"uniqueKey":"alerts.has_hidden_alerts","typeLabel":"boolean"}},"required":["status","check_status","open_alert_count","counts","replaceable_alert_count","agreements","scope","has_hidden_alerts"],"isRequired":true,"uniqueKey":"alerts","typeLabel":"object"},"checks":{"type":"array","items":{"type":"object","properties":{"check_type":{"type":"string","enum":["agreement","purchase_order","duplicate"],"isRequired":true,"uniqueKey":"checks.items.[INDEX].check_type","typeLabel":"enum\u003cstring>"},"status":{"type":"string","enum":["not_started","waiting","not_applicable","running","completed","failed"],"description":"not_started: the type applies, but some of its checks have no current result (never run, or reset); never read it as passed. waiting: the check waits for a prerequisite, named in reason. not_applicable: the check does not apply to the invoice; reason says why. running: a check is in progress. failed: a check failed or was cancelled before completing. completed: every check has a completed result.","isRequired":true,"uniqueKey":"checks.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"reason":{"oneOf":[{"type":"string","enum":["matching","credit_note","credit_note_matched","no_primary_document","no_agreements","no_purchase_order","purchase_order_not_linked","purchase_order_reconciling","purchase_order_lines_unassigned",null],"description":"Why the check waits or does not apply. matching: the invoice's agreements or purchase-orders background run is still matching it. credit_note, credit_note_matched (a credit note fully reverses the invoice), no_primary_document: the invoice cannot be checked. no_agreements: matching found no agreement. no_purchase_order: the invoice cites no order and none is accepted. purchase_order_not_linked: it cites an order and none is accepted yet; it is checked once one is accepted and its lines are assigned (the invoice's purchase-order suggestions say which). purchase_order_reconciling: matching is still settling an accepted order's invoices. purchase_order_lines_unassigned: orders are accepted but none of the invoice's lines is assigned to one yet. Null for other statuses.","isRequired":true,"uniqueKey":"checks.items.[INDEX].reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["matching","credit_note","credit_note_matched","no_primary_document","no_agreements","no_purchase_order","purchase_order_not_linked","purchase_order_reconciling","purchase_order_lines_unassigned",null],"description":"Why the check waits or does not apply. matching: the invoice's agreements or purchase-orders background run is still matching it. credit_note, credit_note_matched (a credit note fully reverses the invoice), no_primary_document: the invoice cannot be checked. no_agreements: matching found no agreement. no_purchase_order: the invoice cites no order and none is accepted. purchase_order_not_linked: it cites an order and none is accepted yet; it is checked once one is accepted and its lines are assigned (the invoice's purchase-order suggestions say which). purchase_order_reconciling: matching is still settling an accepted order's invoices. purchase_order_lines_unassigned: orders are accepted but none of the invoice's lines is assigned to one yet. Null for other statuses.","isRequired":true,"uniqueKey":"checks.items.[INDEX].reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"checks.items.[INDEX].reason","typeLabel":"enum\u003cstring> | null"},"open_alert_count":{"type":"integer","minimum":0,"description":"Open alerts of this check type in scope: live, and neither a false alarm, unsure nor credited.","isRequired":true,"uniqueKey":"checks.items.[INDEX].open_alert_count","typeLabel":"integer"},"review_alert_count":{"type":"integer","minimum":0,"description":"Of the open alerts, those still to review: nobody has confirmed them yet. The rest of open_alert_count are confirmed.","isRequired":true,"uniqueKey":"checks.items.[INDEX].review_alert_count","typeLabel":"integer"},"complete":{"oneOf":[{"type":"boolean","description":"Whether the completed checks covered everything they set out to check. False when one was cut short by its budget or left entries of its answer out as invalid. Null when no check of this type is completed.","isRequired":true,"uniqueKey":"checks.items.[INDEX].complete.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether the completed checks covered everything they set out to check. False when one was cut short by its budget or left entries of its answer out as invalid. Null when no check of this type is completed.","isRequired":true,"uniqueKey":"checks.items.[INDEX].complete.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"checks.items.[INDEX].complete","typeLabel":"boolean | null"}},"required":["check_type","status","reason","open_alert_count","review_alert_count","complete"],"uniqueKey":"checks.items.[INDEX]","typeLabel":"object"},"description":"One entry per check type, limited to the same scope as alerts.","isRequired":true,"uniqueKey":"checks","typeLabel":"object[]"},"check_progress":{"type":"string","enum":["running","failed","settled"],"description":"Whether the invoice's checks have settled. running: a background run (also one waiting for its sync or batch) or a check is in progress; failed: a background run or a check failed and waits for its automatic retry or a person; settled: neither. Poll it after a change, then read alerts and checks. Approving one invoice is allowed either way and its activity records this; bulk approval skips unsettled invoices.","isRequired":true,"uniqueKey":"check_progress","typeLabel":"enum\u003cstring>"},"relationships":{"type":"object","properties":{"letter_count":{"type":"integer","minimum":0,"description":"Readable letters linked to this invoice, listed at GET /v1/invoices/{id}/reminders.","isRequired":true,"uniqueKey":"relationships.letter_count","typeLabel":"integer"},"agreement_count":{"type":"integer","minimum":0,"description":"Matched agreements, listed at GET /v1/invoices/{id}/agreements.","isRequired":true,"uniqueKey":"relationships.agreement_count","typeLabel":"integer"},"alert_count":{"type":"integer","minimum":0,"description":"Alerts on the invoice, including false alarms and unsure ones, listed at GET /v1/alerts?invoice_ids={id}.","isRequired":true,"uniqueKey":"relationships.alert_count","typeLabel":"integer"},"linked_credit_note_count":{"type":"integer","minimum":0,"description":"Credit notes linked to this invoice, including soft-deleted ones.","isRequired":true,"uniqueKey":"relationships.linked_credit_note_count","typeLabel":"integer"},"matched_invoice_count":{"type":"integer","minimum":0,"description":"Invoices this credit note is matched to, including soft-deleted ones.","isRequired":true,"uniqueKey":"relationships.matched_invoice_count","typeLabel":"integer"},"line_item_count":{"type":"integer","minimum":0,"description":"Listed at GET /v1/invoices/{id}/line-items.","isRequired":true,"uniqueKey":"relationships.line_item_count","typeLabel":"integer"},"document_count":{"type":"integer","minimum":0,"description":"Listed at GET /v1/invoices/{id}/documents.","isRequired":true,"uniqueKey":"relationships.document_count","typeLabel":"integer"}},"required":["letter_count","agreement_count","alert_count","linked_credit_note_count","matched_invoice_count","line_item_count","document_count"],"isRequired":true,"uniqueKey":"relationships","typeLabel":"object"},"current_step":{"oneOf":[{"type":"integer","minimum":1,"description":"The approval step whose turn it is (WD-2901): the first step nobody in it has approved. Approvers of later steps wait their turn. Null once every step has an approval, when any approver who has not approved may, once the invoice is decided, and while it has no approvers.","isRequired":true,"uniqueKey":"current_step.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":1,"description":"The approval step whose turn it is (WD-2901): the first step nobody in it has approved. Approvers of later steps wait their turn. Null once every step has an approval, when any approver who has not approved may, once the invoice is decided, and while it has no approvers.","isRequired":true,"uniqueKey":"current_step.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"current_step","typeLabel":"integer | null"},"letter":{"oneOf":[{"type":"object","properties":{"printed_stage":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"letter.oneOf.0.printed_stage.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"letter.oneOf.0.printed_stage.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.printed_stage","typeLabel":"string | null"},"amount_demanded":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_demanded.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_demanded.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.amount_demanded","typeLabel":"string | null"},"charges_known":{"type":"boolean","isRequired":true,"uniqueKey":"letter.oneOf.0.charges_known","typeLabel":"boolean"},"sender":{"oneOf":[{"type":"object","properties":{"name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"letter.oneOf.0.sender.oneOf.0.name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"letter.oneOf.0.sender.oneOf.0.name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.sender.oneOf.0.name","typeLabel":"string | null"},"registration_number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"letter.oneOf.0.sender.oneOf.0.registration_number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"letter.oneOf.0.sender.oneOf.0.registration_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.sender.oneOf.0.registration_number","typeLabel":"string | null"},"registration_country":{"oneOf":[{"type":"string","pattern":"^[A-Z]{2}$","isRequired":true,"uniqueKey":"letter.oneOf.0.sender.oneOf.0.registration_country.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^[A-Z]{2}$","isRequired":true,"uniqueKey":"letter.oneOf.0.sender.oneOf.0.registration_country.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.sender.oneOf.0.registration_country","typeLabel":"string | null"},"vat_number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"letter.oneOf.0.sender.oneOf.0.vat_number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"letter.oneOf.0.sender.oneOf.0.vat_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.sender.oneOf.0.vat_number","typeLabel":"string | null"},"vat_country":{"oneOf":[{"type":"string","pattern":"^[A-Z]{2}$","isRequired":true,"uniqueKey":"letter.oneOf.0.sender.oneOf.0.vat_country.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^[A-Z]{2}$","isRequired":true,"uniqueKey":"letter.oneOf.0.sender.oneOf.0.vat_country.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.sender.oneOf.0.vat_country","typeLabel":"string | null"}},"required":["name","registration_number","registration_country","vat_number","vat_country"],"additionalProperties":false,"isRequired":true,"uniqueKey":"letter.oneOf.0.sender.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"registration_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"registration_country":{"oneOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null","pattern":"^[A-Z]{2}$"}]},"vat_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"vat_country":{"oneOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null","pattern":"^[A-Z]{2}$"}]}},"required":["name","registration_number","registration_country","vat_number","vat_country"],"additionalProperties":false,"isRequired":true,"uniqueKey":"letter.oneOf.0.sender.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.sender","typeLabel":"object | null"},"payee":{"oneOf":[{"type":"object","properties":{"name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"letter.oneOf.0.payee.oneOf.0.name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"letter.oneOf.0.payee.oneOf.0.name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.payee.oneOf.0.name","typeLabel":"string | null"},"registration_number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"letter.oneOf.0.payee.oneOf.0.registration_number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"letter.oneOf.0.payee.oneOf.0.registration_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.payee.oneOf.0.registration_number","typeLabel":"string | null"},"registration_country":{"oneOf":[{"type":"string","pattern":"^[A-Z]{2}$","isRequired":true,"uniqueKey":"letter.oneOf.0.payee.oneOf.0.registration_country.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^[A-Z]{2}$","isRequired":true,"uniqueKey":"letter.oneOf.0.payee.oneOf.0.registration_country.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.payee.oneOf.0.registration_country","typeLabel":"string | null"},"vat_number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"letter.oneOf.0.payee.oneOf.0.vat_number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"letter.oneOf.0.payee.oneOf.0.vat_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.payee.oneOf.0.vat_number","typeLabel":"string | null"},"vat_country":{"oneOf":[{"type":"string","pattern":"^[A-Z]{2}$","isRequired":true,"uniqueKey":"letter.oneOf.0.payee.oneOf.0.vat_country.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^[A-Z]{2}$","isRequired":true,"uniqueKey":"letter.oneOf.0.payee.oneOf.0.vat_country.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.payee.oneOf.0.vat_country","typeLabel":"string | null"}},"required":["name","registration_number","registration_country","vat_number","vat_country"],"additionalProperties":false,"isRequired":true,"uniqueKey":"letter.oneOf.0.payee.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"registration_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"registration_country":{"oneOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null","pattern":"^[A-Z]{2}$"}]},"vat_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"vat_country":{"oneOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null","pattern":"^[A-Z]{2}$"}]}},"required":["name","registration_number","registration_country","vat_number","vat_country"],"additionalProperties":false,"isRequired":true,"uniqueKey":"letter.oneOf.0.payee.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.payee","typeLabel":"object | null"},"payments":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","isRequired":true,"uniqueKey":"letter.oneOf.0.payments.items.[INDEX].amount","typeLabel":"string"},"paid_on":{"oneOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","isRequired":true,"uniqueKey":"letter.oneOf.0.payments.items.[INDEX].paid_on.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^\\d{4}-\\d{2}-\\d{2}$","isRequired":true,"uniqueKey":"letter.oneOf.0.payments.items.[INDEX].paid_on.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.payments.items.[INDEX].paid_on","typeLabel":"string | null"}},"required":["amount","paid_on"],"additionalProperties":false,"uniqueKey":"letter.oneOf.0.payments.items.[INDEX]","typeLabel":"object"},"description":"What the letter prints as already paid.","isRequired":true,"uniqueKey":"letter.oneOf.0.payments","typeLabel":"object[]"},"issues":{"type":"array","items":{"type":"string","enum":["charges_unknown","currency_unknown","sender_unknown","demand_mismatch","may_repeat_charge","sources_disagree"],"uniqueKey":"letter.oneOf.0.issues.items.[INDEX]","typeLabel":"enum\u003cstring>"},"description":"What about the letter a person must check: charges_unknown (its charges were not read), currency_unknown, sender_unknown (read as a reminder from its creditor), demand_mismatch (what it chases and adds does not make up what it asks for), may_repeat_charge (an invoice it chases is not linked, so an earlier letter may have charged the same), sources_disagree (its XML and PDF state different payment details: see source_discrepancies).","isRequired":true,"uniqueKey":"letter.oneOf.0.issues","typeLabel":"enum\u003cstring>[]"},"source_discrepancies":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["amount_demanded","payment_reference","bank_account_number"],"isRequired":true,"uniqueKey":"letter.oneOf.0.source_discrepancies.items.[INDEX].field","typeLabel":"enum\u003cstring>"},"xml_value":{"type":"string","isRequired":true,"uniqueKey":"letter.oneOf.0.source_discrepancies.items.[INDEX].xml_value","typeLabel":"string"},"pdf_value":{"type":"string","isRequired":true,"uniqueKey":"letter.oneOf.0.source_discrepancies.items.[INDEX].pdf_value","typeLabel":"string"}},"required":["field","xml_value","pdf_value"],"uniqueKey":"letter.oneOf.0.source_discrepancies.items.[INDEX]","typeLabel":"object"},"description":"Where its XML and PDF state different values. The letter keeps the PDF amount and the XML payment reference and account until a person writes that field, which settles it.","isRequired":true,"uniqueKey":"letter.oneOf.0.source_discrepancies","typeLabel":"object[]"},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"stated_invoice_number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].stated_invoice_number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].stated_invoice_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].stated_invoice_number","typeLabel":"string | null"},"stated_issued_date":{"oneOf":[{"type":"string","format":"date","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].stated_issued_date.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","format":"date","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].stated_issued_date.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].stated_issued_date","typeLabel":"string\u003cdate> | null"},"stated_due_date":{"oneOf":[{"type":"string","format":"date","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].stated_due_date.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","format":"date","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].stated_due_date.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].stated_due_date","typeLabel":"string\u003cdate> | null"},"stated_original_amount":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].stated_original_amount.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].stated_original_amount.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].stated_original_amount","typeLabel":"string | null"},"stated_outstanding_amount":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].stated_outstanding_amount.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].stated_outstanding_amount.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].stated_outstanding_amount","typeLabel":"string | null"},"stated_payment_reference":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].stated_payment_reference.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].stated_payment_reference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].stated_payment_reference","typeLabel":"string | null"},"original_status":{"type":"string","enum":["matched","unmatched","unavailable"],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].original_status","typeLabel":"enum\u003cstring>"},"original":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].original.oneOf.0.id","typeLabel":"string\u003cuuid>"},"invoice_number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].original.oneOf.0.invoice_number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].original.oneOf.0.invoice_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].original.oneOf.0.invoice_number","typeLabel":"string | null"},"issued_date":{"oneOf":[{"type":"string","format":"date","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].original.oneOf.0.issued_date.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","format":"date","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].original.oneOf.0.issued_date.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].original.oneOf.0.issued_date","typeLabel":"string\u003cdate> | null"},"accounting":{"type":"object","properties":{"status":{"type":"string","enum":["settled","outstanding","unknown"],"description":"Last known ledger balance, not proof of a cash payment.","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].original.oneOf.0.accounting.status","typeLabel":"enum\u003cstring>"},"paid_on":{"oneOf":[{"type":"string","format":"date","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].original.oneOf.0.accounting.paid_on.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","format":"date","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].original.oneOf.0.accounting.paid_on.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].original.oneOf.0.accounting.paid_on","typeLabel":"string\u003cdate> | null"},"read_at":{"oneOf":[{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].original.oneOf.0.accounting.read_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].original.oneOf.0.accounting.read_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].original.oneOf.0.accounting.read_at","typeLabel":"string\u003cdate-time> | null"}},"required":["status","paid_on","read_at"],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].original.oneOf.0.accounting","typeLabel":"object"}},"required":["id","invoice_number","issued_date","accounting"],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].original.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"id":{"type":"string","format":"uuid"},"invoice_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"issued_date":{"oneOf":[{"type":"string","format":"date"},{"type":"null","format":"date"}]},"accounting":{"type":"object","properties":{"status":{"type":"string","enum":["settled","outstanding","unknown"],"description":"Last known ledger balance, not proof of a cash payment."},"paid_on":{"oneOf":[{"type":"string","format":"date"},{"type":"null","format":"date"}]},"read_at":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null","format":"date-time"}]}},"required":["status","paid_on","read_at"]}},"required":["id","invoice_number","issued_date","accounting"],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].original.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].original","typeLabel":"object | null"},"accounting_lookup":{"type":"object","properties":{"can_lookup":{"type":"boolean","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].accounting_lookup.can_lookup","typeLabel":"boolean"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].accounting_lookup.connections.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].accounting_lookup.connections.items.[INDEX].name","typeLabel":"string"}},"required":["id","name"],"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].accounting_lookup.connections.items.[INDEX]","typeLabel":"object"},"description":"The Tripletex connections to choose from, when there are several.","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].accounting_lookup.connections","typeLabel":"object[]"},"status":{"oneOf":[{"type":"string","enum":["searching","not_found","received","open","paid","failed",null],"description":"The last lookup: searching, not_found, received (in Tripletex, not booked), open (booked, unpaid), paid (booked, settled) or failed. Null before the first lookup.","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].accounting_lookup.status.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["searching","not_found","received","open","paid","failed",null],"description":"The last lookup: searching, not_found, received (in Tripletex, not booked), open (booked, unpaid), paid (booked, settled) or failed. Null before the first lookup.","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].accounting_lookup.status.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].accounting_lookup.status","typeLabel":"enum\u003cstring> | null"},"looked_up_at":{"oneOf":[{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].accounting_lookup.looked_up_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].accounting_lookup.looked_up_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].accounting_lookup.looked_up_at","typeLabel":"string\u003cdate-time> | null"},"paid_on":{"oneOf":[{"type":"string","format":"date","description":"With paid: the latest posted payment, when the posted payments settle it.","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].accounting_lookup.paid_on.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","format":"date","description":"With paid: the latest posted payment, when the posted payments settle it.","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].accounting_lookup.paid_on.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].accounting_lookup.paid_on","typeLabel":"string\u003cdate> | null"}},"required":["can_lookup","connections","status","looked_up_at","paid_on"],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].accounting_lookup","typeLabel":"object"},"included_original_recovery":{"type":"object","properties":{"can_import":{"type":"boolean","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].included_original_recovery.can_import","typeLabel":"boolean"},"suggested_pages":{"oneOf":[{"type":"object","properties":{"document_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].included_original_recovery.suggested_pages.oneOf.0.document_id","typeLabel":"string\u003cuuid>"},"start_page":{"type":"integer","exclusiveMinimum":0,"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].included_original_recovery.suggested_pages.oneOf.0.start_page","typeLabel":"integer"},"end_page":{"type":"integer","exclusiveMinimum":0,"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].included_original_recovery.suggested_pages.oneOf.0.end_page","typeLabel":"integer"}},"required":["document_id","start_page","end_page"],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].included_original_recovery.suggested_pages.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"document_id":{"type":"string","format":"uuid"},"start_page":{"type":"integer","exclusiveMinimum":0},"end_page":{"type":"integer","exclusiveMinimum":0}},"required":["document_id","start_page","end_page"],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].included_original_recovery.suggested_pages.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].included_original_recovery.suggested_pages","typeLabel":"object | null"},"sources":{"type":"array","items":{"type":"object","properties":{"document_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].included_original_recovery.sources.items.[INDEX].document_id","typeLabel":"string\u003cuuid>"},"file_name":{"type":"string","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].included_original_recovery.sources.items.[INDEX].file_name","typeLabel":"string"},"page_count":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].included_original_recovery.sources.items.[INDEX].page_count.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].included_original_recovery.sources.items.[INDEX].page_count.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].included_original_recovery.sources.items.[INDEX].page_count","typeLabel":"integer | null"}},"required":["document_id","file_name","page_count"],"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].included_original_recovery.sources.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].included_original_recovery.sources","typeLabel":"object[]"}},"required":["can_import","suggested_pages","sources"],"isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].included_original_recovery","typeLabel":"object"},"can_link":{"type":"boolean","isRequired":true,"uniqueKey":"letter.oneOf.0.claims.items.[INDEX].can_link","typeLabel":"boolean"}},"required":["id","stated_invoice_number","stated_issued_date","stated_due_date","stated_original_amount","stated_outstanding_amount","stated_payment_reference","original_status","original","accounting_lookup","included_original_recovery","can_link"],"uniqueKey":"letter.oneOf.0.claims.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"letter.oneOf.0.claims","typeLabel":"object[]"},"charges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"letter.oneOf.0.charges.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"kind":{"type":"string","enum":["fee","interest","other_cost"],"isRequired":true,"uniqueKey":"letter.oneOf.0.charges.items.[INDEX].kind","typeLabel":"enum\u003cstring>"},"description":{"type":"string","isRequired":true,"uniqueKey":"letter.oneOf.0.charges.items.[INDEX].description","typeLabel":"string"},"amount":{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","isRequired":true,"uniqueKey":"letter.oneOf.0.charges.items.[INDEX].amount","typeLabel":"string"},"claim_id":{"oneOf":[{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"letter.oneOf.0.charges.items.[INDEX].claim_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","isRequired":true,"uniqueKey":"letter.oneOf.0.charges.items.[INDEX].claim_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.charges.items.[INDEX].claim_id","typeLabel":"string\u003cuuid> | null"}},"required":["id","kind","description","amount","claim_id"],"uniqueKey":"letter.oneOf.0.charges.items.[INDEX]","typeLabel":"object"},"description":"The charges as the letter prints them.","isRequired":true,"uniqueKey":"letter.oneOf.0.charges","typeLabel":"object[]"},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["fee","interest","other_cost"],"isRequired":true,"uniqueKey":"letter.oneOf.0.lines.items.[INDEX].kind","typeLabel":"enum\u003cstring>"},"printed":{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letter prints of this kind.","isRequired":true,"uniqueKey":"letter.oneOf.0.lines.items.[INDEX].printed","typeLabel":"string"},"booked_earlier":{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What earlier letters chasing the same invoices already booked of it.","isRequired":true,"uniqueKey":"letter.oneOf.0.lines.items.[INDEX].booked_earlier","typeLabel":"string"},"to_book":{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What this letter books: its line.","isRequired":true,"uniqueKey":"letter.oneOf.0.lines.items.[INDEX].to_book","typeLabel":"string"},"line_item_id":{"oneOf":[{"type":"string","format":"uuid","description":"That line; null when there is nothing new.","isRequired":true,"uniqueKey":"letter.oneOf.0.lines.items.[INDEX].line_item_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"That line; null when there is nothing new.","isRequired":true,"uniqueKey":"letter.oneOf.0.lines.items.[INDEX].line_item_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.lines.items.[INDEX].line_item_id","typeLabel":"string\u003cuuid> | null"}},"required":["kind","printed","booked_earlier","to_book","line_item_id"],"uniqueKey":"letter.oneOf.0.lines.items.[INDEX]","typeLabel":"object"},"description":"Per kind of charge it prints, what it books after what earlier letters booked.","isRequired":true,"uniqueKey":"letter.oneOf.0.lines","typeLabel":"object[]"},"amount_owed":{"oneOf":[{"type":"object","properties":{"currency":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.currency.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.currency.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.currency","typeLabel":"string | null"},"lines":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.lines.items.[INDEX].invoice_id","typeLabel":"string\u003cuuid>"},"invoice_number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.lines.items.[INDEX].invoice_number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.lines.items.[INDEX].invoice_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.lines.items.[INDEX].invoice_number","typeLabel":"string | null"},"issued_date":{"oneOf":[{"type":"string","format":"date","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.lines.items.[INDEX].issued_date.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","format":"date","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.lines.items.[INDEX].issued_date.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.lines.items.[INDEX].issued_date","typeLabel":"string\u003cdate> | null"},"kind":{"type":"string","enum":["invoice","credit_note","charges"],"description":"An invoice or credit note owes what is outstanding on it; a letter's charges what it adds.","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.lines.items.[INDEX].kind","typeLabel":"enum\u003cstring>"},"letter_category":{"oneOf":[{"type":"string","enum":["reminder","collection_notice",null],"description":"Which letter a charges line is; null on an invoice or credit note.","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.lines.items.[INDEX].letter_category.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["reminder","collection_notice",null],"description":"Which letter a charges line is; null on an invoice or credit note.","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.lines.items.[INDEX].letter_category.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.lines.items.[INDEX].letter_category","typeLabel":"enum\u003cstring> | null"},"amount":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while the accounting system has not said what is outstanding.","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.lines.items.[INDEX].amount.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while the accounting system has not said what is outstanding.","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.lines.items.[INDEX].amount.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.lines.items.[INDEX].amount","typeLabel":"string | null"},"source":{"type":"string","enum":["accounting_system","watchdog"],"isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.lines.items.[INDEX].source","typeLabel":"enum\u003cstring>"},"read_at":{"oneOf":[{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.lines.items.[INDEX].read_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.lines.items.[INDEX].read_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.lines.items.[INDEX].read_at","typeLabel":"string\u003cdate-time> | null"}},"required":["invoice_id","invoice_number","issued_date","kind","letter_category","amount","source","read_at"],"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.lines.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.lines","typeLabel":"object[]"},"total":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while any line is unknown.","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.total.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while any line is unknown.","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.total.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.total","typeLabel":"string | null"},"charges":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letters add in fees and interest, paid or not; a rejected letter adds nothing. Null while a letter is hidden from the caller or currencies differ.","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.charges.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letters add in fees and interest, paid or not; a rejected letter adds nothing. Null while a letter is hidden from the caller or currencies differ.","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.charges.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.charges","typeLabel":"string | null"},"claimed":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"A letter's printed demand, for comparison.","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.claimed.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"A letter's printed demand, for comparison.","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.claimed.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.claimed","typeLabel":"string | null"},"difference":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letter claims beyond the total.","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.difference.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letter claims beyond the total.","isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.difference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0.difference","typeLabel":"string | null"}},"required":["currency","lines","total","charges","claimed","difference"],"isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"currency":{"oneOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","format":"uuid"},"invoice_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"issued_date":{"oneOf":[{"type":"string","format":"date"},{"type":"null","format":"date"}]},"kind":{"type":"string","enum":["invoice","credit_note","charges"],"description":"An invoice or credit note owes what is outstanding on it; a letter's charges what it adds."},"letter_category":{"oneOf":[{"type":"string","enum":["reminder","collection_notice",null],"description":"Which letter a charges line is; null on an invoice or credit note."},{"type":"null","enum":["reminder","collection_notice",null],"description":"Which letter a charges line is; null on an invoice or credit note."}]},"amount":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while the accounting system has not said what is outstanding."},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while the accounting system has not said what is outstanding."}]},"source":{"type":"string","enum":["accounting_system","watchdog"]},"read_at":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null","format":"date-time"}]}},"required":["invoice_id","invoice_number","issued_date","kind","letter_category","amount","source","read_at"]}},"total":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while any line is unknown."},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while any line is unknown."}]},"charges":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letters add in fees and interest, paid or not; a rejected letter adds nothing. Null while a letter is hidden from the caller or currencies differ."},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letters add in fees and interest, paid or not; a rejected letter adds nothing. Null while a letter is hidden from the caller or currencies differ."}]},"claimed":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"A letter's printed demand, for comparison."},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"A letter's printed demand, for comparison."}]},"difference":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letter claims beyond the total."},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letter claims beyond the total."}]}},"required":["currency","lines","total","charges","claimed","difference"],"isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter.oneOf.0.amount_owed","typeLabel":"object | null"},"flags":{"type":"object","properties":{"new_account":{"type":"boolean","description":"It asks to be paid to an account that is not on the supplier's card in the accounting system: a known fraud pattern.","isRequired":true,"uniqueKey":"letter.oneOf.0.flags.new_account","typeLabel":"boolean"},"settled_original":{"type":"boolean","description":"An invoice it chases is already paid.","isRequired":true,"uniqueKey":"letter.oneOf.0.flags.settled_original","typeLabel":"boolean"},"missing_original":{"type":"boolean","description":"An invoice it chases is not found in Watchdog.","isRequired":true,"uniqueKey":"letter.oneOf.0.flags.missing_original","typeLabel":"boolean"}},"required":["new_account","settled_original","missing_original"],"isRequired":true,"uniqueKey":"letter.oneOf.0.flags","typeLabel":"object"},"can_link_claims":{"type":"boolean","isRequired":true,"uniqueKey":"letter.oneOf.0.can_link_claims","typeLabel":"boolean"}},"required":["printed_stage","amount_demanded","charges_known","sender","payee","payments","issues","source_discrepancies","claims","charges","lines","amount_owed","flags","can_link_claims"],"isRequired":true,"uniqueKey":"letter.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"printed_stage":{"oneOf":[{"type":"string"},{"type":"null"}]},"amount_demanded":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$"}]},"charges_known":{"type":"boolean"},"sender":{"oneOf":[{"type":"object","properties":{"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"registration_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"registration_country":{"oneOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null","pattern":"^[A-Z]{2}$"}]},"vat_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"vat_country":{"oneOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null","pattern":"^[A-Z]{2}$"}]}},"required":["name","registration_number","registration_country","vat_number","vat_country"],"additionalProperties":false},{"type":"null","properties":{"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"registration_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"registration_country":{"oneOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null","pattern":"^[A-Z]{2}$"}]},"vat_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"vat_country":{"oneOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null","pattern":"^[A-Z]{2}$"}]}},"required":["name","registration_number","registration_country","vat_number","vat_country"],"additionalProperties":false}]},"payee":{"oneOf":[{"type":"object","properties":{"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"registration_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"registration_country":{"oneOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null","pattern":"^[A-Z]{2}$"}]},"vat_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"vat_country":{"oneOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null","pattern":"^[A-Z]{2}$"}]}},"required":["name","registration_number","registration_country","vat_number","vat_country"],"additionalProperties":false},{"type":"null","properties":{"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"registration_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"registration_country":{"oneOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null","pattern":"^[A-Z]{2}$"}]},"vat_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"vat_country":{"oneOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null","pattern":"^[A-Z]{2}$"}]}},"required":["name","registration_number","registration_country","vat_number","vat_country"],"additionalProperties":false}]},"payments":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"paid_on":{"oneOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}]}},"required":["amount","paid_on"],"additionalProperties":false},"description":"What the letter prints as already paid."},"issues":{"type":"array","items":{"type":"string","enum":["charges_unknown","currency_unknown","sender_unknown","demand_mismatch","may_repeat_charge","sources_disagree"]},"description":"What about the letter a person must check: charges_unknown (its charges were not read), currency_unknown, sender_unknown (read as a reminder from its creditor), demand_mismatch (what it chases and adds does not make up what it asks for), may_repeat_charge (an invoice it chases is not linked, so an earlier letter may have charged the same), sources_disagree (its XML and PDF state different payment details: see source_discrepancies)."},"source_discrepancies":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["amount_demanded","payment_reference","bank_account_number"]},"xml_value":{"type":"string"},"pdf_value":{"type":"string"}},"required":["field","xml_value","pdf_value"]},"description":"Where its XML and PDF state different values. The letter keeps the PDF amount and the XML payment reference and account until a person writes that field, which settles it."},"claims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"stated_invoice_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"stated_issued_date":{"oneOf":[{"type":"string","format":"date"},{"type":"null","format":"date"}]},"stated_due_date":{"oneOf":[{"type":"string","format":"date"},{"type":"null","format":"date"}]},"stated_original_amount":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$"}]},"stated_outstanding_amount":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$"}]},"stated_payment_reference":{"oneOf":[{"type":"string"},{"type":"null"}]},"original_status":{"type":"string","enum":["matched","unmatched","unavailable"]},"original":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"invoice_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"issued_date":{"oneOf":[{"type":"string","format":"date"},{"type":"null","format":"date"}]},"accounting":{"type":"object","properties":{"status":{"type":"string","enum":["settled","outstanding","unknown"],"description":"Last known ledger balance, not proof of a cash payment."},"paid_on":{"oneOf":[{"type":"string","format":"date"},{"type":"null","format":"date"}]},"read_at":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null","format":"date-time"}]}},"required":["status","paid_on","read_at"]}},"required":["id","invoice_number","issued_date","accounting"]},{"type":"null","properties":{"id":{"type":"string","format":"uuid"},"invoice_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"issued_date":{"oneOf":[{"type":"string","format":"date"},{"type":"null","format":"date"}]},"accounting":{"type":"object","properties":{"status":{"type":"string","enum":["settled","outstanding","unknown"],"description":"Last known ledger balance, not proof of a cash payment."},"paid_on":{"oneOf":[{"type":"string","format":"date"},{"type":"null","format":"date"}]},"read_at":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null","format":"date-time"}]}},"required":["status","paid_on","read_at"]}},"required":["id","invoice_number","issued_date","accounting"]}]},"accounting_lookup":{"type":"object","properties":{"can_lookup":{"type":"boolean"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"]},"description":"The Tripletex connections to choose from, when there are several."},"status":{"oneOf":[{"type":"string","enum":["searching","not_found","received","open","paid","failed",null],"description":"The last lookup: searching, not_found, received (in Tripletex, not booked), open (booked, unpaid), paid (booked, settled) or failed. Null before the first lookup."},{"type":"null","enum":["searching","not_found","received","open","paid","failed",null],"description":"The last lookup: searching, not_found, received (in Tripletex, not booked), open (booked, unpaid), paid (booked, settled) or failed. Null before the first lookup."}]},"looked_up_at":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null","format":"date-time"}]},"paid_on":{"oneOf":[{"type":"string","format":"date","description":"With paid: the latest posted payment, when the posted payments settle it."},{"type":"null","format":"date","description":"With paid: the latest posted payment, when the posted payments settle it."}]}},"required":["can_lookup","connections","status","looked_up_at","paid_on"]},"included_original_recovery":{"type":"object","properties":{"can_import":{"type":"boolean"},"suggested_pages":{"oneOf":[{"type":"object","properties":{"document_id":{"type":"string","format":"uuid"},"start_page":{"type":"integer","exclusiveMinimum":0},"end_page":{"type":"integer","exclusiveMinimum":0}},"required":["document_id","start_page","end_page"]},{"type":"null","properties":{"document_id":{"type":"string","format":"uuid"},"start_page":{"type":"integer","exclusiveMinimum":0},"end_page":{"type":"integer","exclusiveMinimum":0}},"required":["document_id","start_page","end_page"]}]},"sources":{"type":"array","items":{"type":"object","properties":{"document_id":{"type":"string","format":"uuid"},"file_name":{"type":"string"},"page_count":{"oneOf":[{"type":"integer"},{"type":"null"}]}},"required":["document_id","file_name","page_count"]}}},"required":["can_import","suggested_pages","sources"]},"can_link":{"type":"boolean"}},"required":["id","stated_invoice_number","stated_issued_date","stated_due_date","stated_original_amount","stated_outstanding_amount","stated_payment_reference","original_status","original","accounting_lookup","included_original_recovery","can_link"]}},"charges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["fee","interest","other_cost"]},"description":{"type":"string"},"amount":{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$"},"claim_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]}},"required":["id","kind","description","amount","claim_id"]},"description":"The charges as the letter prints them."},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["fee","interest","other_cost"]},"printed":{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letter prints of this kind."},"booked_earlier":{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What earlier letters chasing the same invoices already booked of it."},"to_book":{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What this letter books: its line."},"line_item_id":{"oneOf":[{"type":"string","format":"uuid","description":"That line; null when there is nothing new."},{"type":"null","format":"uuid","description":"That line; null when there is nothing new."}]}},"required":["kind","printed","booked_earlier","to_book","line_item_id"]},"description":"Per kind of charge it prints, what it books after what earlier letters booked."},"amount_owed":{"oneOf":[{"type":"object","properties":{"currency":{"oneOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","format":"uuid"},"invoice_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"issued_date":{"oneOf":[{"type":"string","format":"date"},{"type":"null","format":"date"}]},"kind":{"type":"string","enum":["invoice","credit_note","charges"],"description":"An invoice or credit note owes what is outstanding on it; a letter's charges what it adds."},"letter_category":{"oneOf":[{"type":"string","enum":["reminder","collection_notice",null],"description":"Which letter a charges line is; null on an invoice or credit note."},{"type":"null","enum":["reminder","collection_notice",null],"description":"Which letter a charges line is; null on an invoice or credit note."}]},"amount":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while the accounting system has not said what is outstanding."},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while the accounting system has not said what is outstanding."}]},"source":{"type":"string","enum":["accounting_system","watchdog"]},"read_at":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null","format":"date-time"}]}},"required":["invoice_id","invoice_number","issued_date","kind","letter_category","amount","source","read_at"]}},"total":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while any line is unknown."},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while any line is unknown."}]},"charges":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letters add in fees and interest, paid or not; a rejected letter adds nothing. Null while a letter is hidden from the caller or currencies differ."},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letters add in fees and interest, paid or not; a rejected letter adds nothing. Null while a letter is hidden from the caller or currencies differ."}]},"claimed":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"A letter's printed demand, for comparison."},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"A letter's printed demand, for comparison."}]},"difference":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letter claims beyond the total."},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letter claims beyond the total."}]}},"required":["currency","lines","total","charges","claimed","difference"]},{"type":"null","properties":{"currency":{"oneOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","format":"uuid"},"invoice_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"issued_date":{"oneOf":[{"type":"string","format":"date"},{"type":"null","format":"date"}]},"kind":{"type":"string","enum":["invoice","credit_note","charges"],"description":"An invoice or credit note owes what is outstanding on it; a letter's charges what it adds."},"letter_category":{"oneOf":[{"type":"string","enum":["reminder","collection_notice",null],"description":"Which letter a charges line is; null on an invoice or credit note."},{"type":"null","enum":["reminder","collection_notice",null],"description":"Which letter a charges line is; null on an invoice or credit note."}]},"amount":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while the accounting system has not said what is outstanding."},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while the accounting system has not said what is outstanding."}]},"source":{"type":"string","enum":["accounting_system","watchdog"]},"read_at":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null","format":"date-time"}]}},"required":["invoice_id","invoice_number","issued_date","kind","letter_category","amount","source","read_at"]}},"total":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while any line is unknown."},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while any line is unknown."}]},"charges":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letters add in fees and interest, paid or not; a rejected letter adds nothing. Null while a letter is hidden from the caller or currencies differ."},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letters add in fees and interest, paid or not; a rejected letter adds nothing. Null while a letter is hidden from the caller or currencies differ."}]},"claimed":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"A letter's printed demand, for comparison."},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"A letter's printed demand, for comparison."}]},"difference":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letter claims beyond the total."},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letter claims beyond the total."}]}},"required":["currency","lines","total","charges","claimed","difference"]}]},"flags":{"type":"object","properties":{"new_account":{"type":"boolean","description":"It asks to be paid to an account that is not on the supplier's card in the accounting system: a known fraud pattern."},"settled_original":{"type":"boolean","description":"An invoice it chases is already paid."},"missing_original":{"type":"boolean","description":"An invoice it chases is not found in Watchdog."}},"required":["new_account","settled_original","missing_original"]},"can_link_claims":{"type":"boolean"}},"required":["printed_stage","amount_demanded","charges_known","sender","payee","payments","issues","source_discrepancies","claims","charges","lines","amount_owed","flags","can_link_claims"],"isRequired":true,"uniqueKey":"letter.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"letter","typeLabel":"object | null"},"payment_handoff":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","enum":["ready","manual"],"description":"ready: sending the invoice gives the payment it registers the letter's KID and due date; sending pays nothing itself. manual: a person pays it as the letter says.","isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.state","typeLabel":"enum\u003cstring>"},"reason":{"oneOf":[{"type":"string","enum":["collector","several_invoices","invalid_reference","partly_paid","new_account","changed_after_transfer",null],"description":"Why a person pays it: what the letter changes that sending cannot.","isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["collector","several_invoices","invalid_reference","partly_paid","new_account","changed_after_transfer",null],"description":"Why a person pays it: what the letter changes that sending cannot.","isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.reason","typeLabel":"enum\u003cstring> | null"},"letter":{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.letter.id","typeLabel":"string\u003cuuid>"},"category":{"type":"string","enum":["reminder","collection_notice"],"isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.letter.category","typeLabel":"enum\u003cstring>"},"issued_date":{"oneOf":[{"type":"string","format":"date","isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.letter.issued_date.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","format":"date","isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.letter.issued_date.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.letter.issued_date","typeLabel":"string\u003cdate> | null"}},"required":["id","category","issued_date"],"isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.letter","typeLabel":"object"},"payee":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.payee.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.payee.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.payee","typeLabel":"string | null"},"account":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.account.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.account.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.account","typeLabel":"string | null"},"reference":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.reference.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.reference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.reference","typeLabel":"string | null"},"reference_kind":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.reference_kind.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.reference_kind.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.reference_kind","typeLabel":"string | null"},"due_date":{"oneOf":[{"type":"string","format":"date","isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.due_date.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","format":"date","isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.due_date.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment_handoff.oneOf.0.due_date","typeLabel":"string\u003cdate> | null"}},"required":["state","reason","letter","payee","account","reference","reference_kind","due_date"],"description":"How the newest letter chasing the invoice says to pay it. Null when no letter chases it, and once it is paid: what remains is the letters' own charges, decided on each letter.","isRequired":true,"uniqueKey":"payment_handoff.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"state":{"type":"string","enum":["ready","manual"],"description":"ready: sending the invoice gives the payment it registers the letter's KID and due date; sending pays nothing itself. manual: a person pays it as the letter says."},"reason":{"oneOf":[{"type":"string","enum":["collector","several_invoices","invalid_reference","partly_paid","new_account","changed_after_transfer",null],"description":"Why a person pays it: what the letter changes that sending cannot."},{"type":"null","enum":["collector","several_invoices","invalid_reference","partly_paid","new_account","changed_after_transfer",null],"description":"Why a person pays it: what the letter changes that sending cannot."}]},"letter":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"category":{"type":"string","enum":["reminder","collection_notice"]},"issued_date":{"oneOf":[{"type":"string","format":"date"},{"type":"null","format":"date"}]}},"required":["id","category","issued_date"]},"payee":{"oneOf":[{"type":"string"},{"type":"null"}]},"account":{"oneOf":[{"type":"string"},{"type":"null"}]},"reference":{"oneOf":[{"type":"string"},{"type":"null"}]},"reference_kind":{"oneOf":[{"type":"string"},{"type":"null"}]},"due_date":{"oneOf":[{"type":"string","format":"date"},{"type":"null","format":"date"}]}},"required":["state","reason","letter","payee","account","reference","reference_kind","due_date"],"description":"How the newest letter chasing the invoice says to pay it. Null when no letter chases it, and once it is paid: what remains is the letters' own charges, decided on each letter.","isRequired":true,"uniqueKey":"payment_handoff.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment_handoff","typeLabel":"object | null"},"amount_owed":{"oneOf":[{"type":"object","description":"Detail only, on an invoice letters chase: what we owe on it and its letters.","required":["currency","lines","total","charges","claimed","difference"],"properties":{"currency":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.currency.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.currency.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amount_owed.oneOf.0.currency","typeLabel":"string | null"},"lines":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.lines.items.[INDEX].invoice_id","typeLabel":"string\u003cuuid>"},"invoice_number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.lines.items.[INDEX].invoice_number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.lines.items.[INDEX].invoice_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amount_owed.oneOf.0.lines.items.[INDEX].invoice_number","typeLabel":"string | null"},"issued_date":{"oneOf":[{"type":"string","format":"date","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.lines.items.[INDEX].issued_date.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","format":"date","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.lines.items.[INDEX].issued_date.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amount_owed.oneOf.0.lines.items.[INDEX].issued_date","typeLabel":"string\u003cdate> | null"},"kind":{"type":"string","enum":["invoice","credit_note","charges"],"description":"An invoice or credit note owes what is outstanding on it; a letter's charges what it adds.","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.lines.items.[INDEX].kind","typeLabel":"enum\u003cstring>"},"letter_category":{"oneOf":[{"type":"string","enum":["reminder","collection_notice",null],"description":"Which letter a charges line is; null on an invoice or credit note.","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.lines.items.[INDEX].letter_category.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["reminder","collection_notice",null],"description":"Which letter a charges line is; null on an invoice or credit note.","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.lines.items.[INDEX].letter_category.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amount_owed.oneOf.0.lines.items.[INDEX].letter_category","typeLabel":"enum\u003cstring> | null"},"amount":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while the accounting system has not said what is outstanding.","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.lines.items.[INDEX].amount.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while the accounting system has not said what is outstanding.","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.lines.items.[INDEX].amount.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amount_owed.oneOf.0.lines.items.[INDEX].amount","typeLabel":"string | null"},"source":{"type":"string","enum":["accounting_system","watchdog"],"isRequired":true,"uniqueKey":"amount_owed.oneOf.0.lines.items.[INDEX].source","typeLabel":"enum\u003cstring>"},"read_at":{"oneOf":[{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.lines.items.[INDEX].read_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.lines.items.[INDEX].read_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amount_owed.oneOf.0.lines.items.[INDEX].read_at","typeLabel":"string\u003cdate-time> | null"}},"required":["invoice_id","invoice_number","issued_date","kind","letter_category","amount","source","read_at"],"uniqueKey":"amount_owed.oneOf.0.lines.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"amount_owed.oneOf.0.lines","typeLabel":"object[]"},"total":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while any line is unknown.","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.total.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while any line is unknown.","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.total.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amount_owed.oneOf.0.total","typeLabel":"string | null"},"charges":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letters add in fees and interest, paid or not; a rejected letter adds nothing. Null while a letter is hidden from the caller or currencies differ.","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.charges.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letters add in fees and interest, paid or not; a rejected letter adds nothing. Null while a letter is hidden from the caller or currencies differ.","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.charges.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amount_owed.oneOf.0.charges","typeLabel":"string | null"},"claimed":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"A letter's printed demand, for comparison.","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.claimed.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"A letter's printed demand, for comparison.","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.claimed.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amount_owed.oneOf.0.claimed","typeLabel":"string | null"},"difference":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letter claims beyond the total.","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.difference.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letter claims beyond the total.","isRequired":true,"uniqueKey":"amount_owed.oneOf.0.difference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amount_owed.oneOf.0.difference","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"amount_owed.oneOf.0","typeLabel":"object"},{"type":"null","description":"Detail only, on an invoice letters chase: what we owe on it and its letters.","required":["currency","lines","total","charges","claimed","difference"],"properties":{"currency":{"oneOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","format":"uuid"},"invoice_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"issued_date":{"oneOf":[{"type":"string","format":"date"},{"type":"null","format":"date"}]},"kind":{"type":"string","enum":["invoice","credit_note","charges"],"description":"An invoice or credit note owes what is outstanding on it; a letter's charges what it adds."},"letter_category":{"oneOf":[{"type":"string","enum":["reminder","collection_notice",null],"description":"Which letter a charges line is; null on an invoice or credit note."},{"type":"null","enum":["reminder","collection_notice",null],"description":"Which letter a charges line is; null on an invoice or credit note."}]},"amount":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while the accounting system has not said what is outstanding."},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while the accounting system has not said what is outstanding."}]},"source":{"type":"string","enum":["accounting_system","watchdog"]},"read_at":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null","format":"date-time"}]}},"required":["invoice_id","invoice_number","issued_date","kind","letter_category","amount","source","read_at"]}},"total":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while any line is unknown."},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Null while any line is unknown."}]},"charges":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letters add in fees and interest, paid or not; a rejected letter adds nothing. Null while a letter is hidden from the caller or currencies differ."},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letters add in fees and interest, paid or not; a rejected letter adds nothing. Null while a letter is hidden from the caller or currencies differ."}]},"claimed":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"A letter's printed demand, for comparison."},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"A letter's printed demand, for comparison."}]},"difference":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letter claims beyond the total."},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the letter claims beyond the total."}]}},"isRequired":true,"uniqueKey":"amount_owed.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amount_owed","typeLabel":"object | null"},"suggested_approvers":{"type":"array","items":{"type":"object","properties":{"user_id":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"suggested_approvers.items.[INDEX].user_id.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"suggested_approvers.items.[INDEX].user_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"suggested_approvers.items.[INDEX].user_id","typeLabel":"string | null"},"team_id":{"oneOf":[{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"suggested_approvers.items.[INDEX].team_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","isRequired":true,"uniqueKey":"suggested_approvers.items.[INDEX].team_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"suggested_approvers.items.[INDEX].team_id","typeLabel":"string\u003cuuid> | null"},"name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"suggested_approvers.items.[INDEX].name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"suggested_approvers.items.[INDEX].name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"suggested_approvers.items.[INDEX].name","typeLabel":"string | null"},"purchase_order":{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"suggested_approvers.items.[INDEX].purchase_order.id","typeLabel":"string\u003cuuid>"},"number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"suggested_approvers.items.[INDEX].purchase_order.number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"suggested_approvers.items.[INDEX].purchase_order.number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"suggested_approvers.items.[INDEX].purchase_order.number","typeLabel":"string | null"}},"required":["id","number"],"isRequired":true,"uniqueKey":"suggested_approvers.items.[INDEX].purchase_order","typeLabel":"object"}},"required":["user_id","team_id","name","purchase_order"],"uniqueKey":"suggested_approvers.items.[INDEX]","typeLabel":"object"},"description":"Detail only. Invoice approvers of its purchase orders who are not on it and could approve it now, as when an order was linked after it got its approvers. Nothing adds them by itself; add them with updateInvoiceApprovers. Empty once it is decided and while it waits for its approvers.","isRequired":true,"uniqueKey":"suggested_approvers","typeLabel":"object[]"},"note":{"oneOf":[{"type":"string","description":"The invoice-wide note in its original wording. Null means unavailable; empty text stays empty.","isRequired":true,"uniqueKey":"note.oneOf.0","typeLabel":"string"},{"type":"null","description":"The invoice-wide note in its original wording. Null means unavailable; empty text stays empty.","isRequired":true,"uniqueKey":"note.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"note","typeLabel":"string | null"},"payment":{"type":"object","properties":{"status":{"type":"string","enum":["paid","unpaid","unknown"],"description":"paid when outstanding.amount is zero, or while paid_mark is set; unpaid when it is not zero, unknown when it is null.","isRequired":true,"uniqueKey":"payment.status","typeLabel":"enum\u003cstring>"},"paid_mark":{"oneOf":[{"type":"object","properties":{"paid_on":{"type":"string","format":"date","isRequired":true,"uniqueKey":"payment.paid_mark.oneOf.0.paid_on","typeLabel":"string\u003cdate>"},"at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"payment.paid_mark.oneOf.0.at","typeLabel":"string\u003cdate-time>"},"by":{"oneOf":[{"type":"object","properties":{"user_id":{"type":"string","isRequired":true,"uniqueKey":"payment.paid_mark.oneOf.0.by.oneOf.0.user_id","typeLabel":"string"},"first_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"payment.paid_mark.oneOf.0.by.oneOf.0.first_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"payment.paid_mark.oneOf.0.by.oneOf.0.first_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment.paid_mark.oneOf.0.by.oneOf.0.first_name","typeLabel":"string | null"},"last_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"payment.paid_mark.oneOf.0.by.oneOf.0.last_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"payment.paid_mark.oneOf.0.by.oneOf.0.last_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment.paid_mark.oneOf.0.by.oneOf.0.last_name","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"payment.paid_mark.oneOf.0.by.oneOf.0.email.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"payment.paid_mark.oneOf.0.by.oneOf.0.email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment.paid_mark.oneOf.0.by.oneOf.0.email","typeLabel":"string | null"}},"required":["user_id","first_name","last_name","email"],"description":"A person, by user ID and name.","isRequired":true,"uniqueKey":"payment.paid_mark.oneOf.0.by.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"user_id":{"type":"string"},"first_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"email":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["user_id","first_name","last_name","email"],"description":"A person, by user ID and name.","isRequired":true,"uniqueKey":"payment.paid_mark.oneOf.0.by.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment.paid_mark.oneOf.0.by","typeLabel":"object | null"}},"required":["paid_on","at","by"],"description":"A person said it is paid on paid_on (by, at) while its accounting system cannot read it (outstanding.unreadable_since). It counts until that system reads it again and its answer replaces this. Set or remove with updateInvoice's paid_mark.","isRequired":true,"uniqueKey":"payment.paid_mark.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"paid_on":{"type":"string","format":"date"},"at":{"type":"string","format":"date-time"},"by":{"oneOf":[{"type":"object","properties":{"user_id":{"type":"string"},"first_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"email":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["user_id","first_name","last_name","email"],"description":"A person, by user ID and name."},{"type":"null","properties":{"user_id":{"type":"string"},"first_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"email":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["user_id","first_name","last_name","email"],"description":"A person, by user ID and name."}]}},"required":["paid_on","at","by"],"description":"A person said it is paid on paid_on (by, at) while its accounting system cannot read it (outstanding.unreadable_since). It counts until that system reads it again and its answer replaces this. Set or remove with updateInvoice's paid_mark.","isRequired":true,"uniqueKey":"payment.paid_mark.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment.paid_mark","typeLabel":"object | null"},"can_mark_paid":{"type":"boolean","description":"Whether the caller may set paid_mark now: the system cannot read it, and the caller is an admin, in the AP team or an approver.","isRequired":true,"uniqueKey":"payment.can_mark_paid","typeLabel":"boolean"},"terms":{"oneOf":[{"type":"string","description":"Payment terms as printed, including conditions. Never inferred from due_date.","isRequired":true,"uniqueKey":"payment.terms.oneOf.0","typeLabel":"string"},{"type":"null","description":"Payment terms as printed, including conditions. Never inferred from due_date.","isRequired":true,"uniqueKey":"payment.terms.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment.terms","typeLabel":"string | null"},"reference":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"payment.reference.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"payment.reference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment.reference","typeLabel":"string | null"},"reference_kind":{"oneOf":[{"type":"string","enum":["kid","rf","se_ocr","fi_reference","dk_fik","message",null],"description":"With reference null, the invoice prints one of this kind that fails its check.","isRequired":true,"uniqueKey":"payment.reference_kind.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["kid","rf","se_ocr","fi_reference","dk_fik","message",null],"description":"With reference null, the invoice prints one of this kind that fails its check.","isRequired":true,"uniqueKey":"payment.reference_kind.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment.reference_kind","typeLabel":"enum\u003cstring> | null"},"bank_account_number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"payment.bank_account_number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"payment.bank_account_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment.bank_account_number","typeLabel":"string | null"},"outstanding":{"type":"object","properties":{"current":{"type":"boolean","description":"Whether the accounting connection can currently read the figure; false when no accounting system holds it, the connection is turned off, credentials are rejected, invoice reading is off, or the system no longer shows the invoice (unreadable_since). When false, the retained amount and read_at may be stale.","isRequired":true,"uniqueKey":"payment.outstanding.current","typeLabel":"boolean"},"amount":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"The amount still owed, as the accounting system states it; null when no accounting system holds the invoice or it states no balance.","example":"1250.00","isRequired":true,"uniqueKey":"payment.outstanding.amount.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"The amount still owed, as the accounting system states it; null when no accounting system holds the invoice or it states no balance.","example":"1250.00","isRequired":true,"uniqueKey":"payment.outstanding.amount.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment.outstanding.amount","typeLabel":"string | null"},"read_at":{"oneOf":[{"type":"string","format":"date-time","description":"When the accounting system's figure was last read, retained while its connection cannot read it; null when it has never been read.","isRequired":true,"uniqueKey":"payment.outstanding.read_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the accounting system's figure was last read, retained while its connection cannot read it; null when it has never been read.","isRequired":true,"uniqueKey":"payment.outstanding.read_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment.outstanding.read_at","typeLabel":"string\u003cdate-time> | null"},"unreadable_since":{"oneOf":[{"type":"string","format":"date-time","description":"Since when the accounting system holds the invoice but no longer shows it to the connection; amount and read_at are from before.","isRequired":true,"uniqueKey":"payment.outstanding.unreadable_since.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"Since when the accounting system holds the invoice but no longer shows it to the connection; amount and read_at are from before.","isRequired":true,"uniqueKey":"payment.outstanding.unreadable_since.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payment.outstanding.unreadable_since","typeLabel":"string\u003cdate-time> | null"}},"required":["current","amount","read_at","unreadable_since"],"isRequired":true,"uniqueKey":"payment.outstanding","typeLabel":"object"}},"required":["status","paid_mark","can_mark_paid","terms","reference","reference_kind","bank_account_number","outstanding"],"isRequired":true,"uniqueKey":"payment","typeLabel":"object"},"delivery":{"type":"object","properties":{"name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"delivery.name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"delivery.name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"delivery.name","typeLabel":"string | null"},"address":{"type":"object","properties":{"street":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"delivery.address.street.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"delivery.address.street.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"delivery.address.street","typeLabel":"string | null"},"city":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"delivery.address.city.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"delivery.address.city.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"delivery.address.city","typeLabel":"string | null"},"state":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"delivery.address.state.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"delivery.address.state.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"delivery.address.state","typeLabel":"string | null"},"postal_code":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"delivery.address.postal_code.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"delivery.address.postal_code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"delivery.address.postal_code","typeLabel":"string | null"},"country_code":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"delivery.address.country_code.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"delivery.address.country_code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"delivery.address.country_code","typeLabel":"string | null"}},"required":["street","city","state","postal_code","country_code"],"isRequired":true,"uniqueKey":"delivery.address","typeLabel":"object"},"date":{"oneOf":[{"type":"string","format":"date","isRequired":true,"uniqueKey":"delivery.date.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","format":"date","isRequired":true,"uniqueKey":"delivery.date.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"delivery.date","typeLabel":"string\u003cdate> | null"}},"required":["name","address","date"],"isRequired":true,"uniqueKey":"delivery","typeLabel":"object"},"references":{"type":"object","properties":{"order_references":{"type":"array","items":{"type":"string","uniqueKey":"references.order_references.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"references.order_references","typeLabel":"string[]"},"buyer_reference":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"references.buyer_reference.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"references.buyer_reference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"references.buyer_reference","typeLabel":"string | null"},"seller_reference":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"references.seller_reference.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"references.seller_reference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"references.seller_reference","typeLabel":"string | null"},"buyer_contact":{"oneOf":[{"type":"object","properties":{"name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"references.buyer_contact.oneOf.0.name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"references.buyer_contact.oneOf.0.name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"references.buyer_contact.oneOf.0.name","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"references.buyer_contact.oneOf.0.email.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"references.buyer_contact.oneOf.0.email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"references.buyer_contact.oneOf.0.email","typeLabel":"string | null"}},"required":["name","email"],"description":"The buyer's contact person an e-invoice names, often printed as Deres ref.","isRequired":true,"uniqueKey":"references.buyer_contact.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"email":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["name","email"],"description":"The buyer's contact person an e-invoice names, often printed as Deres ref.","isRequired":true,"uniqueKey":"references.buyer_contact.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"references.buyer_contact","typeLabel":"object | null"},"contract_reference":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"references.contract_reference.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"references.contract_reference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"references.contract_reference","typeLabel":"string | null"},"project_reference":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"references.project_reference.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"references.project_reference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"references.project_reference","typeLabel":"string | null"},"accounting_cost":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"references.accounting_cost.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"references.accounting_cost.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"references.accounting_cost","typeLabel":"string | null"},"credit_note_invoice_reference":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"references.credit_note_invoice_reference.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"references.credit_note_invoice_reference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"references.credit_note_invoice_reference","typeLabel":"string | null"}},"required":["order_references","buyer_reference","seller_reference","buyer_contact","contract_reference","project_reference","accounting_cost","credit_note_invoice_reference"],"isRequired":true,"uniqueKey":"references","typeLabel":"object"},"additional_properties":{"oneOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"additional_properties.oneOf.0.items.[INDEX].name","typeLabel":"string"},"value":{"type":"string","isRequired":true,"uniqueKey":"additional_properties.oneOf.0.items.[INDEX].value","typeLabel":"string"},"source_path":{"oneOf":[{"type":"string","uniqueKey":"additional_properties.oneOf.0.items.[INDEX].source_path.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"additional_properties.oneOf.0.items.[INDEX].source_path.oneOf.1","typeLabel":"null"}],"uniqueKey":"additional_properties.oneOf.0.items.[INDEX].source_path","typeLabel":"string | null"},"scheme":{"oneOf":[{"type":"string","uniqueKey":"additional_properties.oneOf.0.items.[INDEX].scheme.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"additional_properties.oneOf.0.items.[INDEX].scheme.oneOf.1","typeLabel":"null"}],"uniqueKey":"additional_properties.oneOf.0.items.[INDEX].scheme","typeLabel":"string | null"}},"required":["name","value"],"uniqueKey":"additional_properties.oneOf.0.items.[INDEX]","typeLabel":"object"},"description":"Other named details found in the source, with where they were found. Null when not available; empty when none were found.","isRequired":true,"uniqueKey":"additional_properties.oneOf.0","typeLabel":"object[]"},{"type":"null","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"},"source_path":{"oneOf":[{"type":"string"},{"type":"null"}]},"scheme":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["name","value"]},"description":"Other named details found in the source, with where they were found. Null when not available; empty when none were found.","isRequired":true,"uniqueKey":"additional_properties.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"additional_properties","typeLabel":"object[] | null"},"approval":{"oneOf":[{"type":"object","properties":{"decision":{"type":"string","enum":["approved","closed"],"description":"approved by its approvers or the approval policy, or closed in Watchdog without payment (lifecycle.status closed).","isRequired":true,"uniqueKey":"approval.oneOf.0.decision","typeLabel":"enum\u003cstring>"},"decided_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"approval.oneOf.0.decided_at","typeLabel":"string\u003cdate-time>"},"decided_by":{"oneOf":[{"type":"object","properties":{"user_id":{"type":"string","isRequired":true,"uniqueKey":"approval.oneOf.0.decided_by.oneOf.0.user_id","typeLabel":"string"},"first_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approval.oneOf.0.decided_by.oneOf.0.first_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approval.oneOf.0.decided_by.oneOf.0.first_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.decided_by.oneOf.0.first_name","typeLabel":"string | null"},"last_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approval.oneOf.0.decided_by.oneOf.0.last_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approval.oneOf.0.decided_by.oneOf.0.last_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.decided_by.oneOf.0.last_name","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approval.oneOf.0.decided_by.oneOf.0.email.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approval.oneOf.0.decided_by.oneOf.0.email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.decided_by.oneOf.0.email","typeLabel":"string | null"}},"required":["user_id","first_name","last_name","email"],"description":"A person, by user ID and name.","isRequired":true,"uniqueKey":"approval.oneOf.0.decided_by.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"user_id":{"type":"string"},"first_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"email":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["user_id","first_name","last_name","email"],"description":"A person, by user ID and name.","isRequired":true,"uniqueKey":"approval.oneOf.0.decided_by.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.decided_by","typeLabel":"object | null"},"decided_by_kind":{"type":"string","enum":["person","policy"],"description":"person, or policy (the approval policy; decided_by is null).","isRequired":true,"uniqueKey":"approval.oneOf.0.decided_by_kind","typeLabel":"enum\u003cstring>"},"reason":{"oneOf":[{"type":"string","description":"Why it was closed; null when approved, and on an invoice closed without a reason before reasons were required.","isRequired":true,"uniqueKey":"approval.oneOf.0.reason.oneOf.0","typeLabel":"string"},{"type":"null","description":"Why it was closed; null when approved, and on an invoice closed without a reason before reasons were required.","isRequired":true,"uniqueKey":"approval.oneOf.0.reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.reason","typeLabel":"string | null"}},"required":["decision","decided_at","decided_by","decided_by_kind","reason"],"description":"The decision; null until it is approved or closed, and again once reopened.","isRequired":true,"uniqueKey":"approval.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"decision":{"type":"string","enum":["approved","closed"],"description":"approved by its approvers or the approval policy, or closed in Watchdog without payment (lifecycle.status closed)."},"decided_at":{"type":"string","format":"date-time"},"decided_by":{"oneOf":[{"type":"object","properties":{"user_id":{"type":"string"},"first_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"email":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["user_id","first_name","last_name","email"],"description":"A person, by user ID and name."},{"type":"null","properties":{"user_id":{"type":"string"},"first_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"email":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["user_id","first_name","last_name","email"],"description":"A person, by user ID and name."}]},"decided_by_kind":{"type":"string","enum":["person","policy"],"description":"person, or policy (the approval policy; decided_by is null)."},"reason":{"oneOf":[{"type":"string","description":"Why it was closed; null when approved, and on an invoice closed without a reason before reasons were required."},{"type":"null","description":"Why it was closed; null when approved, and on an invoice closed without a reason before reasons were required."}]}},"required":["decision","decided_at","decided_by","decided_by_kind","reason"],"description":"The decision; null until it is approved or closed, and again once reopened.","isRequired":true,"uniqueKey":"approval.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval","typeLabel":"object | null"},"sent_back":{"oneOf":[{"type":"object","properties":{"at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"sent_back.oneOf.0.at","typeLabel":"string\u003cdate-time>"},"by":{"oneOf":[{"type":"object","properties":{"user_id":{"type":"string","isRequired":true,"uniqueKey":"sent_back.oneOf.0.by.oneOf.0.user_id","typeLabel":"string"},"first_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"sent_back.oneOf.0.by.oneOf.0.first_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"sent_back.oneOf.0.by.oneOf.0.first_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sent_back.oneOf.0.by.oneOf.0.first_name","typeLabel":"string | null"},"last_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"sent_back.oneOf.0.by.oneOf.0.last_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"sent_back.oneOf.0.by.oneOf.0.last_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sent_back.oneOf.0.by.oneOf.0.last_name","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"sent_back.oneOf.0.by.oneOf.0.email.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"sent_back.oneOf.0.by.oneOf.0.email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sent_back.oneOf.0.by.oneOf.0.email","typeLabel":"string | null"}},"required":["user_id","first_name","last_name","email"],"description":"A person, by user ID and name.","isRequired":true,"uniqueKey":"sent_back.oneOf.0.by.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"user_id":{"type":"string"},"first_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"email":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["user_id","first_name","last_name","email"],"description":"A person, by user ID and name.","isRequired":true,"uniqueKey":"sent_back.oneOf.0.by.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sent_back.oneOf.0.by","typeLabel":"object | null"},"reason":{"type":"string","description":"What the approver asked the AP team to fix.","isRequired":true,"uniqueKey":"sent_back.oneOf.0.reason","typeLabel":"string"}},"required":["at","by","reason"],"description":"Set while the invoice is sent back to Inbox (lifecycle.status sent_back): who sent it back, when and why. Null once it is sent for approval again.","isRequired":true,"uniqueKey":"sent_back.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"at":{"type":"string","format":"date-time"},"by":{"oneOf":[{"type":"object","properties":{"user_id":{"type":"string"},"first_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"email":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["user_id","first_name","last_name","email"],"description":"A person, by user ID and name."},{"type":"null","properties":{"user_id":{"type":"string"},"first_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"email":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["user_id","first_name","last_name","email"],"description":"A person, by user ID and name."}]},"reason":{"type":"string","description":"What the approver asked the AP team to fix."}},"required":["at","by","reason"],"description":"Set while the invoice is sent back to Inbox (lifecycle.status sent_back): who sent it back, when and why. Null once it is sent for approval again.","isRequired":true,"uniqueKey":"sent_back.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sent_back","typeLabel":"object | null"},"progress":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","enum":["received","checks","coding","approved","booked","paid"],"isRequired":true,"uniqueKey":"progress.items.[INDEX].step","typeLabel":"enum\u003cstring>"},"status":{"type":"string","enum":["done","current","pending","blocked","skipped"],"description":"done; current: the one step it is working toward (approval, then booking, then payment); pending: not reached, or a check or coding still under way; blocked: closed, rejected in the accounting system, failed or cancelled; skipped: passed by without Watchdog.","isRequired":true,"uniqueKey":"progress.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"state":{"type":"string","enum":["received","needs_company","checking","check_failed","issues","clean","not_checked","suggesting","needs_coding","coded","no_coding","needs_approver","assigning_approvers","auto_check","waiting","on_hold","approved","closed","rejected","skipped","external","not_sent","sent","in_system","failed","booked","cancelled","not_paid","paid","unknown"],"description":"received, checks, coding, approved: Watchdog. booked, paid: the accounting system. needs_company: waiting for its company (setInvoiceCompany). checking: a check is running; check_failed: one waits for its retry; issues or clean once checks settle; not_checked: nothing to check. suggesting: coding suggestions are being made; needs_coding: lines still need coding (detail: how many); coded: every line is coded or the accounting system booked it; no_coding: coding is off. assigning_approvers: see assigning_approvers. auto_check: the approval policy decides it first. waiting: for actor, or for any of the approvers when null. external: booked before Watchdog saw it. sent: Watchdog sent it, not booked yet. rejected on booked: Watchdog sent it and the accounting system rejected it in its own approval before booking it (detail: their comment). in_system: there already without Watchdog sending it. paid: its outstanding amount there is 0; unknown: it states no balance, and it is booked there, arrived as its history, or its connection keeps no bookings.","isRequired":true,"uniqueKey":"progress.items.[INDEX].state","typeLabel":"enum\u003cstring>"},"actor":{"oneOf":[{"type":"object","description":"Who decided, held it, or is awaited.","required":["user_id","first_name","last_name","email"],"properties":{"user_id":{"type":"string","isRequired":true,"uniqueKey":"progress.items.[INDEX].actor.oneOf.0.user_id","typeLabel":"string"},"first_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"progress.items.[INDEX].actor.oneOf.0.first_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"progress.items.[INDEX].actor.oneOf.0.first_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"progress.items.[INDEX].actor.oneOf.0.first_name","typeLabel":"string | null"},"last_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"progress.items.[INDEX].actor.oneOf.0.last_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"progress.items.[INDEX].actor.oneOf.0.last_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"progress.items.[INDEX].actor.oneOf.0.last_name","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"progress.items.[INDEX].actor.oneOf.0.email.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"progress.items.[INDEX].actor.oneOf.0.email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"progress.items.[INDEX].actor.oneOf.0.email","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"progress.items.[INDEX].actor.oneOf.0","typeLabel":"object"},{"type":"null","description":"Who decided, held it, or is awaited.","required":["user_id","first_name","last_name","email"],"properties":{"user_id":{"type":"string"},"first_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"email":{"oneOf":[{"type":"string"},{"type":"null"}]}},"isRequired":true,"uniqueKey":"progress.items.[INDEX].actor.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"progress.items.[INDEX].actor","typeLabel":"object | null"},"at":{"oneOf":[{"type":"string","format":"date-time","description":"When this state began, when known; a payment date is midnight UTC.","isRequired":true,"uniqueKey":"progress.items.[INDEX].at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When this state began, when known; a payment date is midnight UTC.","isRequired":true,"uniqueKey":"progress.items.[INDEX].at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"progress.items.[INDEX].at","typeLabel":"string\u003cdate-time> | null"},"detail":{"oneOf":[{"type":"string","description":"The hold or close reason, the voucher number once booked, or how many lines still need coding.","isRequired":true,"uniqueKey":"progress.items.[INDEX].detail.oneOf.0","typeLabel":"string"},{"type":"null","description":"The hold or close reason, the voucher number once booked, or how many lines still need coding.","isRequired":true,"uniqueKey":"progress.items.[INDEX].detail.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"progress.items.[INDEX].detail","typeLabel":"string | null"}},"required":["step","status","state","actor","at","detail"],"uniqueKey":"progress.items.[INDEX]","typeLabel":"object"},"description":"The lifecycle: received, approved, booked, paid, each with its own state.","isRequired":true,"uniqueKey":"progress","typeLabel":"object[]"},"hold":{"oneOf":[{"type":"object","properties":{"since":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"hold.oneOf.0.since","typeLabel":"string\u003cdate-time>"},"by":{"oneOf":[{"type":"object","properties":{"user_id":{"type":"string","isRequired":true,"uniqueKey":"hold.oneOf.0.by.oneOf.0.user_id","typeLabel":"string"},"first_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"hold.oneOf.0.by.oneOf.0.first_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"hold.oneOf.0.by.oneOf.0.first_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"hold.oneOf.0.by.oneOf.0.first_name","typeLabel":"string | null"},"last_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"hold.oneOf.0.by.oneOf.0.last_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"hold.oneOf.0.by.oneOf.0.last_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"hold.oneOf.0.by.oneOf.0.last_name","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"hold.oneOf.0.by.oneOf.0.email.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"hold.oneOf.0.by.oneOf.0.email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"hold.oneOf.0.by.oneOf.0.email","typeLabel":"string | null"}},"required":["user_id","first_name","last_name","email"],"description":"A person, by user ID and name.","isRequired":true,"uniqueKey":"hold.oneOf.0.by.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"user_id":{"type":"string"},"first_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"email":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["user_id","first_name","last_name","email"],"description":"A person, by user ID and name.","isRequired":true,"uniqueKey":"hold.oneOf.0.by.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"hold.oneOf.0.by","typeLabel":"object | null"},"reason":{"oneOf":[{"type":"string","description":"What the invoice waits for; null when no reason was given.","isRequired":true,"uniqueKey":"hold.oneOf.0.reason.oneOf.0","typeLabel":"string"},{"type":"null","description":"What the invoice waits for; null when no reason was given.","isRequired":true,"uniqueKey":"hold.oneOf.0.reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"hold.oneOf.0.reason","typeLabel":"string | null"}},"required":["since","by","reason"],"description":"Set while the invoice is on hold; null otherwise.","isRequired":true,"uniqueKey":"hold.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"since":{"type":"string","format":"date-time"},"by":{"oneOf":[{"type":"object","properties":{"user_id":{"type":"string"},"first_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"email":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["user_id","first_name","last_name","email"],"description":"A person, by user ID and name."},{"type":"null","properties":{"user_id":{"type":"string"},"first_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"email":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["user_id","first_name","last_name","email"],"description":"A person, by user ID and name."}]},"reason":{"oneOf":[{"type":"string","description":"What the invoice waits for; null when no reason was given."},{"type":"null","description":"What the invoice waits for; null when no reason was given."}]}},"required":["since","by","reason"],"description":"Set while the invoice is on hold; null otherwise.","isRequired":true,"uniqueKey":"hold.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"hold","typeLabel":"object | null"},"locked":{"type":"boolean","description":"Sent for approval: a record until it is reopened, and every correction (updateInvoice, line items, documents, classification) returns 409 until then; actions says what the caller may still do. False while it is a draft in Inbox, and for an invoice that never went through approval in Watchdog.","isRequired":true,"uniqueKey":"locked","typeLabel":"boolean"},"intake":{"type":"object","properties":{"status":{"type":"string","enum":["missing_info","processing","complete"],"isRequired":true,"uniqueKey":"intake.status","typeLabel":"enum\u003cstring>"},"missing":{"type":"array","items":{"type":"string","enum":["company","supplier"],"uniqueKey":"intake.missing.items.[INDEX]","typeLabel":"enum\u003cstring>"},"isRequired":true,"uniqueKey":"intake.missing","typeLabel":"enum\u003cstring>[]"}},"required":["status","missing"],"description":"Processing (matching, checks, coding and approvers) starts once the invoice has a company and a supplier; a recipient is optional. missing says which a person must choose. Complete means that processing ended, not that every check passed.","isRequired":true,"uniqueKey":"intake","typeLabel":"object"},"actions":{"type":"object","properties":{"edit":{"type":"object","properties":{"allowed":{"type":"boolean","isRequired":true,"uniqueKey":"actions.edit.allowed","typeLabel":"boolean"},"reason":{"oneOf":[{"type":"string","enum":["deleted","not_now","read_only","sent_for_approval","in_accounting_system","approvers_only","ap_team_only","needs_company","needs_supplier","assigning_approvers","processing",null],"description":"Why not; null when allowed. approvers_only: only its approvers, the AP team and admins. ap_team_only: only the AP team and admins.","isRequired":true,"uniqueKey":"actions.edit.reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["deleted","not_now","read_only","sent_for_approval","in_accounting_system","approvers_only","ap_team_only","needs_company","needs_supplier","assigning_approvers","processing",null],"description":"Why not; null when allowed. approvers_only: only its approvers, the AP team and admins. ap_team_only: only the AP team and admins.","isRequired":true,"uniqueKey":"actions.edit.reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"actions.edit.reason","typeLabel":"enum\u003cstring> | null"}},"required":["allowed","reason"],"isRequired":true,"uniqueKey":"actions.edit","typeLabel":"object"},"edit_approvers":{"type":"object","properties":{"allowed":{"type":"boolean","isRequired":true,"uniqueKey":"actions.edit_approvers.allowed","typeLabel":"boolean"},"reason":{"oneOf":[{"type":"string","enum":["deleted","not_now","read_only","sent_for_approval","in_accounting_system","approvers_only","ap_team_only","needs_company","needs_supplier","assigning_approvers","processing",null],"description":"Why not; null when allowed. approvers_only: only its approvers, the AP team and admins. ap_team_only: only the AP team and admins.","isRequired":true,"uniqueKey":"actions.edit_approvers.reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["deleted","not_now","read_only","sent_for_approval","in_accounting_system","approvers_only","ap_team_only","needs_company","needs_supplier","assigning_approvers","processing",null],"description":"Why not; null when allowed. approvers_only: only its approvers, the AP team and admins. ap_team_only: only the AP team and admins.","isRequired":true,"uniqueKey":"actions.edit_approvers.reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"actions.edit_approvers.reason","typeLabel":"enum\u003cstring> | null"}},"required":["allowed","reason"],"isRequired":true,"uniqueKey":"actions.edit_approvers","typeLabel":"object"},"run_checks":{"type":"object","properties":{"allowed":{"type":"boolean","isRequired":true,"uniqueKey":"actions.run_checks.allowed","typeLabel":"boolean"},"reason":{"oneOf":[{"type":"string","enum":["deleted","not_now","read_only","sent_for_approval","in_accounting_system","approvers_only","ap_team_only","needs_company","needs_supplier","assigning_approvers","processing",null],"description":"Why not; null when allowed. approvers_only: only its approvers, the AP team and admins. ap_team_only: only the AP team and admins.","isRequired":true,"uniqueKey":"actions.run_checks.reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["deleted","not_now","read_only","sent_for_approval","in_accounting_system","approvers_only","ap_team_only","needs_company","needs_supplier","assigning_approvers","processing",null],"description":"Why not; null when allowed. approvers_only: only its approvers, the AP team and admins. ap_team_only: only the AP team and admins.","isRequired":true,"uniqueKey":"actions.run_checks.reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"actions.run_checks.reason","typeLabel":"enum\u003cstring> | null"}},"required":["allowed","reason"],"isRequired":true,"uniqueKey":"actions.run_checks","typeLabel":"object"},"suggest_coding":{"type":"object","properties":{"allowed":{"type":"boolean","isRequired":true,"uniqueKey":"actions.suggest_coding.allowed","typeLabel":"boolean"},"reason":{"oneOf":[{"type":"string","enum":["deleted","not_now","read_only","sent_for_approval","in_accounting_system","approvers_only","ap_team_only","needs_company","needs_supplier","assigning_approvers","processing",null],"description":"Why not; null when allowed. approvers_only: only its approvers, the AP team and admins. ap_team_only: only the AP team and admins.","isRequired":true,"uniqueKey":"actions.suggest_coding.reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["deleted","not_now","read_only","sent_for_approval","in_accounting_system","approvers_only","ap_team_only","needs_company","needs_supplier","assigning_approvers","processing",null],"description":"Why not; null when allowed. approvers_only: only its approvers, the AP team and admins. ap_team_only: only the AP team and admins.","isRequired":true,"uniqueKey":"actions.suggest_coding.reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"actions.suggest_coding.reason","typeLabel":"enum\u003cstring> | null"}},"required":["allowed","reason"],"isRequired":true,"uniqueKey":"actions.suggest_coding","typeLabel":"object"},"code":{"type":"object","properties":{"allowed":{"type":"boolean","isRequired":true,"uniqueKey":"actions.code.allowed","typeLabel":"boolean"},"reason":{"oneOf":[{"type":"string","enum":["deleted","not_now","read_only","sent_for_approval","in_accounting_system","approvers_only","ap_team_only","needs_company","needs_supplier","assigning_approvers","processing",null],"description":"Why not; null when allowed. approvers_only: only its approvers, the AP team and admins. ap_team_only: only the AP team and admins.","isRequired":true,"uniqueKey":"actions.code.reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["deleted","not_now","read_only","sent_for_approval","in_accounting_system","approvers_only","ap_team_only","needs_company","needs_supplier","assigning_approvers","processing",null],"description":"Why not; null when allowed. approvers_only: only its approvers, the AP team and admins. ap_team_only: only the AP team and admins.","isRequired":true,"uniqueKey":"actions.code.reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"actions.code.reason","typeLabel":"enum\u003cstring> | null"}},"required":["allowed","reason"],"isRequired":true,"uniqueKey":"actions.code","typeLabel":"object"},"send_for_approval":{"type":"object","properties":{"allowed":{"type":"boolean","isRequired":true,"uniqueKey":"actions.send_for_approval.allowed","typeLabel":"boolean"},"reason":{"oneOf":[{"type":"string","enum":["deleted","not_now","read_only","sent_for_approval","in_accounting_system","approvers_only","ap_team_only","needs_company","needs_supplier","assigning_approvers","processing",null],"description":"Why not; null when allowed. approvers_only: only its approvers, the AP team and admins. ap_team_only: only the AP team and admins.","isRequired":true,"uniqueKey":"actions.send_for_approval.reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["deleted","not_now","read_only","sent_for_approval","in_accounting_system","approvers_only","ap_team_only","needs_company","needs_supplier","assigning_approvers","processing",null],"description":"Why not; null when allowed. approvers_only: only its approvers, the AP team and admins. ap_team_only: only the AP team and admins.","isRequired":true,"uniqueKey":"actions.send_for_approval.reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"actions.send_for_approval.reason","typeLabel":"enum\u003cstring> | null"}},"required":["allowed","reason"],"isRequired":true,"uniqueKey":"actions.send_for_approval","typeLabel":"object"},"pull_back":{"type":"object","properties":{"allowed":{"type":"boolean","isRequired":true,"uniqueKey":"actions.pull_back.allowed","typeLabel":"boolean"},"reason":{"oneOf":[{"type":"string","enum":["deleted","not_now","read_only","sent_for_approval","in_accounting_system","approvers_only","ap_team_only","needs_company","needs_supplier","assigning_approvers","processing",null],"description":"Why not; null when allowed. approvers_only: only its approvers, the AP team and admins. ap_team_only: only the AP team and admins.","isRequired":true,"uniqueKey":"actions.pull_back.reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["deleted","not_now","read_only","sent_for_approval","in_accounting_system","approvers_only","ap_team_only","needs_company","needs_supplier","assigning_approvers","processing",null],"description":"Why not; null when allowed. approvers_only: only its approvers, the AP team and admins. ap_team_only: only the AP team and admins.","isRequired":true,"uniqueKey":"actions.pull_back.reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"actions.pull_back.reason","typeLabel":"enum\u003cstring> | null"}},"required":["allowed","reason"],"isRequired":true,"uniqueKey":"actions.pull_back","typeLabel":"object"},"reopen":{"type":"object","properties":{"allowed":{"type":"boolean","isRequired":true,"uniqueKey":"actions.reopen.allowed","typeLabel":"boolean"},"reason":{"oneOf":[{"type":"string","enum":["deleted","not_now","read_only","sent_for_approval","in_accounting_system","approvers_only","ap_team_only","needs_company","needs_supplier","assigning_approvers","processing",null],"description":"Why not; null when allowed. approvers_only: only its approvers, the AP team and admins. ap_team_only: only the AP team and admins.","isRequired":true,"uniqueKey":"actions.reopen.reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["deleted","not_now","read_only","sent_for_approval","in_accounting_system","approvers_only","ap_team_only","needs_company","needs_supplier","assigning_approvers","processing",null],"description":"Why not; null when allowed. approvers_only: only its approvers, the AP team and admins. ap_team_only: only the AP team and admins.","isRequired":true,"uniqueKey":"actions.reopen.reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"actions.reopen.reason","typeLabel":"enum\u003cstring> | null"}},"required":["allowed","reason"],"isRequired":true,"uniqueKey":"actions.reopen","typeLabel":"object"},"close":{"type":"object","properties":{"allowed":{"type":"boolean","isRequired":true,"uniqueKey":"actions.close.allowed","typeLabel":"boolean"},"reason":{"oneOf":[{"type":"string","enum":["deleted","not_now","read_only","sent_for_approval","in_accounting_system","approvers_only","ap_team_only","needs_company","needs_supplier","assigning_approvers","processing",null],"description":"Why not; null when allowed. approvers_only: only its approvers, the AP team and admins. ap_team_only: only the AP team and admins.","isRequired":true,"uniqueKey":"actions.close.reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["deleted","not_now","read_only","sent_for_approval","in_accounting_system","approvers_only","ap_team_only","needs_company","needs_supplier","assigning_approvers","processing",null],"description":"Why not; null when allowed. approvers_only: only its approvers, the AP team and admins. ap_team_only: only the AP team and admins.","isRequired":true,"uniqueKey":"actions.close.reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"actions.close.reason","typeLabel":"enum\u003cstring> | null"}},"required":["allowed","reason"],"isRequired":true,"uniqueKey":"actions.close","typeLabel":"object"},"hold":{"type":"object","properties":{"allowed":{"type":"boolean","isRequired":true,"uniqueKey":"actions.hold.allowed","typeLabel":"boolean"},"reason":{"oneOf":[{"type":"string","enum":["deleted","not_now","read_only","sent_for_approval","in_accounting_system","approvers_only","ap_team_only","needs_company","needs_supplier","assigning_approvers","processing",null],"description":"Why not; null when allowed. approvers_only: only its approvers, the AP team and admins. ap_team_only: only the AP team and admins.","isRequired":true,"uniqueKey":"actions.hold.reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["deleted","not_now","read_only","sent_for_approval","in_accounting_system","approvers_only","ap_team_only","needs_company","needs_supplier","assigning_approvers","processing",null],"description":"Why not; null when allowed. approvers_only: only its approvers, the AP team and admins. ap_team_only: only the AP team and admins.","isRequired":true,"uniqueKey":"actions.hold.reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"actions.hold.reason","typeLabel":"enum\u003cstring> | null"}},"required":["allowed","reason"],"isRequired":true,"uniqueKey":"actions.hold","typeLabel":"object"}},"required":["edit","edit_approvers","run_checks","suggest_coding","code","send_for_approval","pull_back","reopen","close","hold"],"description":"What the caller may do now, by the rules the writes apply. code: updateInvoiceCoding; pull_back: from Approval to Inbox, approvals cleared; hold: put on hold or take off. send_for_approval is still refused while lifecycle.blockers lists anything.","isRequired":true,"uniqueKey":"actions","typeLabel":"object"},"voucher":{"oneOf":[{"type":"object","properties":{"number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"voucher.oneOf.0.number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"voucher.oneOf.0.number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"voucher.oneOf.0.number","typeLabel":"string | null"},"postings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cost","supplier","customer","system"],"description":"supplier: payables row; customer: customer-account row; system: generated (VAT, rounding).","isRequired":true,"uniqueKey":"voucher.oneOf.0.postings.items.[INDEX].kind","typeLabel":"enum\u003cstring>"},"account":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"voucher.oneOf.0.postings.items.[INDEX].account.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"voucher.oneOf.0.postings.items.[INDEX].account.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"voucher.oneOf.0.postings.items.[INDEX].account","typeLabel":"string | null"},"vat_code":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"voucher.oneOf.0.postings.items.[INDEX].vat_code.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"voucher.oneOf.0.postings.items.[INDEX].vat_code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"voucher.oneOf.0.postings.items.[INDEX].vat_code","typeLabel":"string | null"},"dimensions":{"type":"array","items":{"type":"string","uniqueKey":"voucher.oneOf.0.postings.items.[INDEX].dimensions.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"voucher.oneOf.0.postings.items.[INDEX].dimensions","typeLabel":"string[]"},"amount":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Net; credits negative. Null when the accounting system does not state it.","example":"1250.00","isRequired":true,"uniqueKey":"voucher.oneOf.0.postings.items.[INDEX].amount.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Net; credits negative. Null when the accounting system does not state it.","example":"1250.00","isRequired":true,"uniqueKey":"voucher.oneOf.0.postings.items.[INDEX].amount.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"voucher.oneOf.0.postings.items.[INDEX].amount","typeLabel":"string | null"},"amount_gross":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Gross; credits negative. Null when the accounting system does not state it.","example":"1250.00","isRequired":true,"uniqueKey":"voucher.oneOf.0.postings.items.[INDEX].amount_gross.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Gross; credits negative. Null when the accounting system does not state it.","example":"1250.00","isRequired":true,"uniqueKey":"voucher.oneOf.0.postings.items.[INDEX].amount_gross.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"voucher.oneOf.0.postings.items.[INDEX].amount_gross","typeLabel":"string | null"}},"required":["kind","account","vat_code","dimensions","amount","amount_gross"],"uniqueKey":"voucher.oneOf.0.postings.items.[INDEX]","typeLabel":"object"},"description":"Every row, in row order.","isRequired":true,"uniqueKey":"voucher.oneOf.0.postings","typeLabel":"object[]"}},"required":["number","postings"],"description":"The voucher the accounting system booked it on, with names from its chart of accounts. Null when none (Tripletex only).","isRequired":true,"uniqueKey":"voucher.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"number":{"oneOf":[{"type":"string"},{"type":"null"}]},"postings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cost","supplier","customer","system"],"description":"supplier: payables row; customer: customer-account row; system: generated (VAT, rounding)."},"account":{"oneOf":[{"type":"string"},{"type":"null"}]},"vat_code":{"oneOf":[{"type":"string"},{"type":"null"}]},"dimensions":{"type":"array","items":{"type":"string"}},"amount":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Net; credits negative. Null when the accounting system does not state it.","example":"1250.00"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Net; credits negative. Null when the accounting system does not state it.","example":"1250.00"}]},"amount_gross":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Gross; credits negative. Null when the accounting system does not state it.","example":"1250.00"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Gross; credits negative. Null when the accounting system does not state it.","example":"1250.00"}]}},"required":["kind","account","vat_code","dimensions","amount","amount_gross"]},"description":"Every row, in row order."}},"required":["number","postings"],"description":"The voucher the accounting system booked it on, with names from its chart of accounts. Null when none (Tripletex only).","isRequired":true,"uniqueKey":"voucher.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"voucher","typeLabel":"object | null"},"transfer":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["not_sent","transferred","failed","in_accounting_system"],"description":"not_sent while it is approved and not sent since its approval or a later change to its lines, coding or documents (send it with transferInvoice); transferred once the invoice is in the accounting system with its documents confirmed, coded and ready to book there; failed when the last attempt since the current approval did not get it there completely, or stopped after writing the voucher; in_accounting_system while it is approved but an accounting system delivered it too (its sync or an import settled as a duplicate), or sending found the supplier invoice there already and wrote nothing, so it is there already and is not sent; its lifecycle.status is then sent or later.","isRequired":true,"uniqueKey":"transfer.oneOf.0.status","typeLabel":"enum\u003cstring>"},"system_name":{"oneOf":[{"type":"string","description":"The accounting system, such as Tripletex; null when no connection was chosen.","isRequired":true,"uniqueKey":"transfer.oneOf.0.system_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The accounting system, such as Tripletex; null when no connection was chosen.","isRequired":true,"uniqueKey":"transfer.oneOf.0.system_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"transfer.oneOf.0.system_name","typeLabel":"string | null"},"connection":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"transfer.oneOf.0.connection.oneOf.0.id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","isRequired":true,"uniqueKey":"transfer.oneOf.0.connection.oneOf.0.name","typeLabel":"string"},"provider":{"type":"string","description":"The provider key, such as tripletex.","isRequired":true,"uniqueKey":"transfer.oneOf.0.connection.oneOf.0.provider","typeLabel":"string"}},"required":["id","name","provider"],"description":"The connection it was or will be written through; null when none was chosen or it was deleted.","isRequired":true,"uniqueKey":"transfer.oneOf.0.connection.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"provider":{"type":"string","description":"The provider key, such as tripletex."}},"required":["id","name","provider"],"description":"The connection it was or will be written through; null when none was chosen or it was deleted.","isRequired":true,"uniqueKey":"transfer.oneOf.0.connection.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"transfer.oneOf.0.connection","typeLabel":"object | null"},"voucher_id":{"oneOf":[{"type":"string","description":"The accounting system's ID for the invoice's voucher; also set when an attempt failed after the voucher was written or because it holds an earlier version of the invoice, and while not_sent when it was sent before the approval or change.","isRequired":true,"uniqueKey":"transfer.oneOf.0.voucher_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The accounting system's ID for the invoice's voucher; also set when an attempt failed after the voucher was written or because it holds an earlier version of the invoice, and while not_sent when it was sent before the approval or change.","isRequired":true,"uniqueKey":"transfer.oneOf.0.voucher_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"transfer.oneOf.0.voucher_id","typeLabel":"string | null"},"at":{"oneOf":[{"type":"string","format":"date-time","description":"When it was written, or when the last attempt failed; null while not_sent.","isRequired":true,"uniqueKey":"transfer.oneOf.0.at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When it was written, or when the last attempt failed; null while not_sent.","isRequired":true,"uniqueKey":"transfer.oneOf.0.at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"transfer.oneOf.0.at","typeLabel":"string\u003cdate-time> | null"},"supplier_bank_account":{"oneOf":[{"type":"string","enum":["same","card_empty","different",null],"description":"Once transferred: how the accounting system found the bank account sent against its supplier card, which its payments use. different when they differ (check with the supplier before paying), card_empty when the card has none, same when they agree. Null when no account was sent or the system said nothing, and before it is transferred.","isRequired":true,"uniqueKey":"transfer.oneOf.0.supplier_bank_account.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["same","card_empty","different",null],"description":"Once transferred: how the accounting system found the bank account sent against its supplier card, which its payments use. different when they differ (check with the supplier before paying), card_empty when the card has none, same when they agree. Null when no account was sent or the system said nothing, and before it is transferred.","isRequired":true,"uniqueKey":"transfer.oneOf.0.supplier_bank_account.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"transfer.oneOf.0.supplier_bank_account","typeLabel":"enum\u003cstring> | null"},"failure":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","enum":["unsupported_category","no_connection","connection_disabled","invoice_incomplete","not_coded","coding_from_other_connection","amounts_mismatch","company_mismatch","supplier_not_in_erp","supplier_link_unavailable","supplier_ambiguous","supplier_same_name","currency_unsupported","nothing_to_post","too_many_lines","dimension_unsupported","rounding_account_missing","sign_in_missing","sign_in_expired","sender_permission_missing","supplier_invoice_flow_off","duplicate_in_erp","ambiguous","changed_after_transfer","not_supplier_invoice","registered_differs","not_bookable","permission_missing","credentials_rejected","rejected","documents_rejected","documents_missing","reply_unreadable","provider_changed","unavailable","transfer_error"],"isRequired":true,"uniqueKey":"transfer.oneOf.0.failure.oneOf.0.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"transfer.oneOf.0.failure.oneOf.0.message","typeLabel":"string"},"retryable":{"type":"boolean","description":"Whether sending again can help once the message is followed; false while the invoice is as it is (currency, lines) or Watchdog paused sending.","isRequired":true,"uniqueKey":"transfer.oneOf.0.failure.oneOf.0.retryable","typeLabel":"boolean"}},"required":["code","message","retryable"],"description":"Why the last attempt failed; null once written.","isRequired":true,"uniqueKey":"transfer.oneOf.0.failure.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"code":{"type":"string","enum":["unsupported_category","no_connection","connection_disabled","invoice_incomplete","not_coded","coding_from_other_connection","amounts_mismatch","company_mismatch","supplier_not_in_erp","supplier_link_unavailable","supplier_ambiguous","supplier_same_name","currency_unsupported","nothing_to_post","too_many_lines","dimension_unsupported","rounding_account_missing","sign_in_missing","sign_in_expired","sender_permission_missing","supplier_invoice_flow_off","duplicate_in_erp","ambiguous","changed_after_transfer","not_supplier_invoice","registered_differs","not_bookable","permission_missing","credentials_rejected","rejected","documents_rejected","documents_missing","reply_unreadable","provider_changed","unavailable","transfer_error"]},"message":{"type":"string"},"retryable":{"type":"boolean","description":"Whether sending again can help once the message is followed; false while the invoice is as it is (currency, lines) or Watchdog paused sending."}},"required":["code","message","retryable"],"description":"Why the last attempt failed; null once written.","isRequired":true,"uniqueKey":"transfer.oneOf.0.failure.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"transfer.oneOf.0.failure","typeLabel":"object | null"},"booking_failure":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","enum":["approval_required","period_locked","vat_locked","department_locked","duplicate","permission_missing","sign_in_missing","sign_in_expired","rejected","unavailable","unconfirmed","provider_changed"],"isRequired":true,"uniqueKey":"transfer.oneOf.0.booking_failure.oneOf.0.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"transfer.oneOf.0.booking_failure.oneOf.0.message","typeLabel":"string"},"retryable":{"type":"boolean","description":"Whether bookInvoice can help once the cause is fixed; false while Watchdog paused booking.","isRequired":true,"uniqueKey":"transfer.oneOf.0.booking_failure.oneOf.0.retryable","typeLabel":"boolean"}},"required":["code","message","retryable"],"description":"Why the accounting system did not book it after the send. Fix the cause, then call bookInvoice or book it there. Null otherwise.","isRequired":true,"uniqueKey":"transfer.oneOf.0.booking_failure.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"code":{"type":"string","enum":["approval_required","period_locked","vat_locked","department_locked","duplicate","permission_missing","sign_in_missing","sign_in_expired","rejected","unavailable","unconfirmed","provider_changed"]},"message":{"type":"string"},"retryable":{"type":"boolean","description":"Whether bookInvoice can help once the cause is fixed; false while Watchdog paused booking."}},"required":["code","message","retryable"],"description":"Why the accounting system did not book it after the send. Fix the cause, then call bookInvoice or book it there. Null otherwise.","isRequired":true,"uniqueKey":"transfer.oneOf.0.booking_failure.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"transfer.oneOf.0.booking_failure","typeLabel":"object | null"},"blocked":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","enum":["not_coded","supplier_not_in_erp","no_connection","connection_disabled","sign_in_missing","sign_in_expired","currency_unsupported"],"description":"not_coded: a line has no account yet. supplier_not_in_erp: the supplier is not in the accounting system the company sends to; create or link it there (createErpSupplier, linkErpSupplier). no_connection: no connection sends invoices any more. connection_disabled: the connection is turned off. sign_in_missing: no one is signed in on the connection to send as. sign_in_expired: that sign-in expired. currency_unsupported: the accounting system registers another currency only (Tripletex: NOK).","isRequired":true,"uniqueKey":"transfer.oneOf.0.blocked.oneOf.0.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"transfer.oneOf.0.blocked.oneOf.0.message","typeLabel":"string"},"connection":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"transfer.oneOf.0.blocked.oneOf.0.connection.oneOf.0.id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","isRequired":true,"uniqueKey":"transfer.oneOf.0.blocked.oneOf.0.connection.oneOf.0.name","typeLabel":"string"},"provider":{"type":"string","isRequired":true,"uniqueKey":"transfer.oneOf.0.blocked.oneOf.0.connection.oneOf.0.provider","typeLabel":"string"}},"required":["id","name","provider"],"description":"The connection sending was checked against, where an admin fixes it; null for no_connection.","isRequired":true,"uniqueKey":"transfer.oneOf.0.blocked.oneOf.0.connection.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"provider":{"type":"string"}},"required":["id","name","provider"],"description":"The connection sending was checked against, where an admin fixes it; null for no_connection.","isRequired":true,"uniqueKey":"transfer.oneOf.0.blocked.oneOf.0.connection.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"transfer.oneOf.0.blocked.oneOf.0.connection","typeLabel":"object | null"}},"required":["code","message","connection"],"description":"While not_sent or failed: why sending it now would fail, known without asking the accounting system; sending it anyway records that failure. Null when sending would try, and in the other states.","isRequired":true,"uniqueKey":"transfer.oneOf.0.blocked.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"code":{"type":"string","enum":["not_coded","supplier_not_in_erp","no_connection","connection_disabled","sign_in_missing","sign_in_expired","currency_unsupported"],"description":"not_coded: a line has no account yet. supplier_not_in_erp: the supplier is not in the accounting system the company sends to; create or link it there (createErpSupplier, linkErpSupplier). no_connection: no connection sends invoices any more. connection_disabled: the connection is turned off. sign_in_missing: no one is signed in on the connection to send as. sign_in_expired: that sign-in expired. currency_unsupported: the accounting system registers another currency only (Tripletex: NOK)."},"message":{"type":"string"},"connection":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"provider":{"type":"string"}},"required":["id","name","provider"],"description":"The connection sending was checked against, where an admin fixes it; null for no_connection."},{"type":"null","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"provider":{"type":"string"}},"required":["id","name","provider"],"description":"The connection sending was checked against, where an admin fixes it; null for no_connection."}]}},"required":["code","message","connection"],"description":"While not_sent or failed: why sending it now would fail, known without asking the accounting system; sending it anyway records that failure. Null when sending would try, and in the other states.","isRequired":true,"uniqueKey":"transfer.oneOf.0.blocked.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"transfer.oneOf.0.blocked","typeLabel":"object | null"},"deleted_in_accounting_system":{"oneOf":[{"type":"object","properties":{"voucher_id":{"oneOf":[{"type":"string","description":"The voucher the accounting system deleted.","isRequired":true,"uniqueKey":"transfer.oneOf.0.deleted_in_accounting_system.oneOf.0.voucher_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The voucher the accounting system deleted.","isRequired":true,"uniqueKey":"transfer.oneOf.0.deleted_in_accounting_system.oneOf.0.voucher_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"transfer.oneOf.0.deleted_in_accounting_system.oneOf.0.voucher_id","typeLabel":"string | null"},"at":{"type":"string","format":"date-time","description":"When Watchdog found it deleted.","isRequired":true,"uniqueKey":"transfer.oneOf.0.deleted_in_accounting_system.oneOf.0.at","typeLabel":"string\u003cdate-time>"}},"required":["voucher_id","at"],"description":"While not_sent: the accounting system deleted the voucher Watchdog sent since its approval. The invoice stays approved; sending it again writes a new voucher, or close it if it should not be paid. Null otherwise.","isRequired":true,"uniqueKey":"transfer.oneOf.0.deleted_in_accounting_system.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"voucher_id":{"oneOf":[{"type":"string","description":"The voucher the accounting system deleted."},{"type":"null","description":"The voucher the accounting system deleted."}]},"at":{"type":"string","format":"date-time","description":"When Watchdog found it deleted."}},"required":["voucher_id","at"],"description":"While not_sent: the accounting system deleted the voucher Watchdog sent since its approval. The invoice stays approved; sending it again writes a new voucher, or close it if it should not be paid. Null otherwise.","isRequired":true,"uniqueKey":"transfer.oneOf.0.deleted_in_accounting_system.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"transfer.oneOf.0.deleted_in_accounting_system","typeLabel":"object | null"}},"required":["status","system_name","connection","voucher_id","at","supplier_bank_account","failure","booking_failure","blocked","deleted_in_accounting_system"],"description":"For an invoice or credit note Watchdog received (Peppol, email, upload) and approved under accounts payable: whether it was registered in the organization's accounting system as a supplier invoice, with its coding and payment details (Tripletex: as the person signed in on the connection, in Ikke bokførte bilag, its payment waiting for approval there or set to pay later), and booked if the integration books what it sends. Approving does not send it: transferInvoice does, and sending again retries a failed attempt. Only invoices in NOK are written so far; others fail as currency_unsupported. A written invoice stays shown after the approval is reopened. Credit notes are registered as credit notes. Null when there is nothing to send (one not approved under accounts payable, or no connection takes invoices), and while an attempt is still writing.","isRequired":true,"uniqueKey":"transfer.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"status":{"type":"string","enum":["not_sent","transferred","failed","in_accounting_system"],"description":"not_sent while it is approved and not sent since its approval or a later change to its lines, coding or documents (send it with transferInvoice); transferred once the invoice is in the accounting system with its documents confirmed, coded and ready to book there; failed when the last attempt since the current approval did not get it there completely, or stopped after writing the voucher; in_accounting_system while it is approved but an accounting system delivered it too (its sync or an import settled as a duplicate), or sending found the supplier invoice there already and wrote nothing, so it is there already and is not sent; its lifecycle.status is then sent or later."},"system_name":{"oneOf":[{"type":"string","description":"The accounting system, such as Tripletex; null when no connection was chosen."},{"type":"null","description":"The accounting system, such as Tripletex; null when no connection was chosen."}]},"connection":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"provider":{"type":"string","description":"The provider key, such as tripletex."}},"required":["id","name","provider"],"description":"The connection it was or will be written through; null when none was chosen or it was deleted."},{"type":"null","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"provider":{"type":"string","description":"The provider key, such as tripletex."}},"required":["id","name","provider"],"description":"The connection it was or will be written through; null when none was chosen or it was deleted."}]},"voucher_id":{"oneOf":[{"type":"string","description":"The accounting system's ID for the invoice's voucher; also set when an attempt failed after the voucher was written or because it holds an earlier version of the invoice, and while not_sent when it was sent before the approval or change."},{"type":"null","description":"The accounting system's ID for the invoice's voucher; also set when an attempt failed after the voucher was written or because it holds an earlier version of the invoice, and while not_sent when it was sent before the approval or change."}]},"at":{"oneOf":[{"type":"string","format":"date-time","description":"When it was written, or when the last attempt failed; null while not_sent."},{"type":"null","format":"date-time","description":"When it was written, or when the last attempt failed; null while not_sent."}]},"supplier_bank_account":{"oneOf":[{"type":"string","enum":["same","card_empty","different",null],"description":"Once transferred: how the accounting system found the bank account sent against its supplier card, which its payments use. different when they differ (check with the supplier before paying), card_empty when the card has none, same when they agree. Null when no account was sent or the system said nothing, and before it is transferred."},{"type":"null","enum":["same","card_empty","different",null],"description":"Once transferred: how the accounting system found the bank account sent against its supplier card, which its payments use. different when they differ (check with the supplier before paying), card_empty when the card has none, same when they agree. Null when no account was sent or the system said nothing, and before it is transferred."}]},"failure":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","enum":["unsupported_category","no_connection","connection_disabled","invoice_incomplete","not_coded","coding_from_other_connection","amounts_mismatch","company_mismatch","supplier_not_in_erp","supplier_link_unavailable","supplier_ambiguous","supplier_same_name","currency_unsupported","nothing_to_post","too_many_lines","dimension_unsupported","rounding_account_missing","sign_in_missing","sign_in_expired","sender_permission_missing","supplier_invoice_flow_off","duplicate_in_erp","ambiguous","changed_after_transfer","not_supplier_invoice","registered_differs","not_bookable","permission_missing","credentials_rejected","rejected","documents_rejected","documents_missing","reply_unreadable","provider_changed","unavailable","transfer_error"]},"message":{"type":"string"},"retryable":{"type":"boolean","description":"Whether sending again can help once the message is followed; false while the invoice is as it is (currency, lines) or Watchdog paused sending."}},"required":["code","message","retryable"],"description":"Why the last attempt failed; null once written."},{"type":"null","properties":{"code":{"type":"string","enum":["unsupported_category","no_connection","connection_disabled","invoice_incomplete","not_coded","coding_from_other_connection","amounts_mismatch","company_mismatch","supplier_not_in_erp","supplier_link_unavailable","supplier_ambiguous","supplier_same_name","currency_unsupported","nothing_to_post","too_many_lines","dimension_unsupported","rounding_account_missing","sign_in_missing","sign_in_expired","sender_permission_missing","supplier_invoice_flow_off","duplicate_in_erp","ambiguous","changed_after_transfer","not_supplier_invoice","registered_differs","not_bookable","permission_missing","credentials_rejected","rejected","documents_rejected","documents_missing","reply_unreadable","provider_changed","unavailable","transfer_error"]},"message":{"type":"string"},"retryable":{"type":"boolean","description":"Whether sending again can help once the message is followed; false while the invoice is as it is (currency, lines) or Watchdog paused sending."}},"required":["code","message","retryable"],"description":"Why the last attempt failed; null once written."}]},"booking_failure":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","enum":["approval_required","period_locked","vat_locked","department_locked","duplicate","permission_missing","sign_in_missing","sign_in_expired","rejected","unavailable","unconfirmed","provider_changed"]},"message":{"type":"string"},"retryable":{"type":"boolean","description":"Whether bookInvoice can help once the cause is fixed; false while Watchdog paused booking."}},"required":["code","message","retryable"],"description":"Why the accounting system did not book it after the send. Fix the cause, then call bookInvoice or book it there. Null otherwise."},{"type":"null","properties":{"code":{"type":"string","enum":["approval_required","period_locked","vat_locked","department_locked","duplicate","permission_missing","sign_in_missing","sign_in_expired","rejected","unavailable","unconfirmed","provider_changed"]},"message":{"type":"string"},"retryable":{"type":"boolean","description":"Whether bookInvoice can help once the cause is fixed; false while Watchdog paused booking."}},"required":["code","message","retryable"],"description":"Why the accounting system did not book it after the send. Fix the cause, then call bookInvoice or book it there. Null otherwise."}]},"blocked":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","enum":["not_coded","supplier_not_in_erp","no_connection","connection_disabled","sign_in_missing","sign_in_expired","currency_unsupported"],"description":"not_coded: a line has no account yet. supplier_not_in_erp: the supplier is not in the accounting system the company sends to; create or link it there (createErpSupplier, linkErpSupplier). no_connection: no connection sends invoices any more. connection_disabled: the connection is turned off. sign_in_missing: no one is signed in on the connection to send as. sign_in_expired: that sign-in expired. currency_unsupported: the accounting system registers another currency only (Tripletex: NOK)."},"message":{"type":"string"},"connection":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"provider":{"type":"string"}},"required":["id","name","provider"],"description":"The connection sending was checked against, where an admin fixes it; null for no_connection."},{"type":"null","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"provider":{"type":"string"}},"required":["id","name","provider"],"description":"The connection sending was checked against, where an admin fixes it; null for no_connection."}]}},"required":["code","message","connection"],"description":"While not_sent or failed: why sending it now would fail, known without asking the accounting system; sending it anyway records that failure. Null when sending would try, and in the other states."},{"type":"null","properties":{"code":{"type":"string","enum":["not_coded","supplier_not_in_erp","no_connection","connection_disabled","sign_in_missing","sign_in_expired","currency_unsupported"],"description":"not_coded: a line has no account yet. supplier_not_in_erp: the supplier is not in the accounting system the company sends to; create or link it there (createErpSupplier, linkErpSupplier). no_connection: no connection sends invoices any more. connection_disabled: the connection is turned off. sign_in_missing: no one is signed in on the connection to send as. sign_in_expired: that sign-in expired. currency_unsupported: the accounting system registers another currency only (Tripletex: NOK)."},"message":{"type":"string"},"connection":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"provider":{"type":"string"}},"required":["id","name","provider"],"description":"The connection sending was checked against, where an admin fixes it; null for no_connection."},{"type":"null","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"provider":{"type":"string"}},"required":["id","name","provider"],"description":"The connection sending was checked against, where an admin fixes it; null for no_connection."}]}},"required":["code","message","connection"],"description":"While not_sent or failed: why sending it now would fail, known without asking the accounting system; sending it anyway records that failure. Null when sending would try, and in the other states."}]},"deleted_in_accounting_system":{"oneOf":[{"type":"object","properties":{"voucher_id":{"oneOf":[{"type":"string","description":"The voucher the accounting system deleted."},{"type":"null","description":"The voucher the accounting system deleted."}]},"at":{"type":"string","format":"date-time","description":"When Watchdog found it deleted."}},"required":["voucher_id","at"],"description":"While not_sent: the accounting system deleted the voucher Watchdog sent since its approval. The invoice stays approved; sending it again writes a new voucher, or close it if it should not be paid. Null otherwise."},{"type":"null","properties":{"voucher_id":{"oneOf":[{"type":"string","description":"The voucher the accounting system deleted."},{"type":"null","description":"The voucher the accounting system deleted."}]},"at":{"type":"string","format":"date-time","description":"When Watchdog found it deleted."}},"required":["voucher_id","at"],"description":"While not_sent: the accounting system deleted the voucher Watchdog sent since its approval. The invoice stays approved; sending it again writes a new voucher, or close it if it should not be paid. Null otherwise."}]}},"required":["status","system_name","connection","voucher_id","at","supplier_bank_account","failure","booking_failure","blocked","deleted_in_accounting_system"],"description":"For an invoice or credit note Watchdog received (Peppol, email, upload) and approved under accounts payable: whether it was registered in the organization's accounting system as a supplier invoice, with its coding and payment details (Tripletex: as the person signed in on the connection, in Ikke bokførte bilag, its payment waiting for approval there or set to pay later), and booked if the integration books what it sends. Approving does not send it: transferInvoice does, and sending again retries a failed attempt. Only invoices in NOK are written so far; others fail as currency_unsupported. A written invoice stays shown after the approval is reopened. Credit notes are registered as credit notes. Null when there is nothing to send (one not approved under accounts payable, or no connection takes invoices), and while an attempt is still writing.","isRequired":true,"uniqueKey":"transfer.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"transfer","typeLabel":"object | null"},"origin":{"type":"object","properties":{"type":{"type":"string","enum":["structured","documents","integration","unknown"],"description":"How the invoice was created: from an accounting system, from documents (Peppol, email, upload, API import), or from structured data.","isRequired":true,"uniqueKey":"origin.type","typeLabel":"enum\u003cstring>"},"import_id":{"oneOf":[{"type":"string","format":"uuid","description":"The import that created the invoice, when known.","isRequired":true,"uniqueKey":"origin.import_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The import that created the invoice, when known.","isRequired":true,"uniqueKey":"origin.import_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"origin.import_id","typeLabel":"string\u003cuuid> | null"}},"required":["type","import_id"],"isRequired":true,"uniqueKey":"origin","typeLabel":"object"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"sources.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"channel":{"type":"string","enum":["upload","api","email","integration","peppol"],"description":"How it arrived: integration (an accounting system), peppol, email, upload or api.","isRequired":true,"uniqueKey":"sources.items.[INDEX].channel","typeLabel":"enum\u003cstring>"},"linked":{"type":"boolean","description":"Arrived for an invoice another source had already created. It never changes the invoice; the first source decides its data.","isRequired":true,"uniqueKey":"sources.items.[INDEX].linked","typeLabel":"boolean"},"state":{"type":"string","enum":["active","deleted_in_source","cancelled_in_source","connection_deleted"],"description":"What the source system says about its copy: active, deleted_in_source, cancelled_in_source, or connection_deleted. Watchdog's own state of the invoice is separate.","isRequired":true,"uniqueKey":"sources.items.[INDEX].state","typeLabel":"enum\u003cstring>"},"received_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"sources.items.[INDEX].received_at","typeLabel":"string\u003cdate-time>"},"document_id":{"oneOf":[{"type":"string","format":"uuid","description":"The file that arrived; for Peppol, the received original. Null for an accounting system.","isRequired":true,"uniqueKey":"sources.items.[INDEX].document_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The file that arrived; for Peppol, the received original. Null for an accounting system.","isRequired":true,"uniqueKey":"sources.items.[INDEX].document_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].document_id","typeLabel":"string\u003cuuid> | null"},"source_system":{"oneOf":[{"type":"string","description":"The accounting system, for channel integration.","isRequired":true,"uniqueKey":"sources.items.[INDEX].source_system.oneOf.0","typeLabel":"string"},{"type":"null","description":"The accounting system, for channel integration.","isRequired":true,"uniqueKey":"sources.items.[INDEX].source_system.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].source_system","typeLabel":"string | null"},"source_invoice_id":{"oneOf":[{"type":"string","description":"The accounting system's ID for its copy.","isRequired":true,"uniqueKey":"sources.items.[INDEX].source_invoice_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The accounting system's ID for its copy.","isRequired":true,"uniqueKey":"sources.items.[INDEX].source_invoice_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].source_invoice_id","typeLabel":"string | null"},"outstanding_amount":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the accounting system says is left to pay, as a decimal string.","isRequired":true,"uniqueKey":"sources.items.[INDEX].outstanding_amount.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the accounting system says is left to pay, as a decimal string.","isRequired":true,"uniqueKey":"sources.items.[INDEX].outstanding_amount.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].outstanding_amount","typeLabel":"string | null"},"approval_status":{"oneOf":[{"type":"string","enum":["pending","approved","rejected",null],"description":"The accounting system's own approval of its copy, beside Watchdog's.","isRequired":true,"uniqueKey":"sources.items.[INDEX].approval_status.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["pending","approved","rejected",null],"description":"The accounting system's own approval of its copy, beside Watchdog's.","isRequired":true,"uniqueKey":"sources.items.[INDEX].approval_status.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].approval_status","typeLabel":"enum\u003cstring> | null"},"stated":{"oneOf":[{"type":"object","properties":{"company_id":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.company_id.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.company_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.company_id","typeLabel":"string | null"},"supplier_id":{"oneOf":[{"type":"string","description":"The supplier's ID in the accounting system.","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.supplier_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The supplier's ID in the accounting system.","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.supplier_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.supplier_id","typeLabel":"string | null"},"supplier_org_number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.supplier_org_number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.supplier_org_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.supplier_org_number","typeLabel":"string | null"},"invoice_number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.invoice_number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.invoice_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.invoice_number","typeLabel":"string | null"},"invoice_date":{"oneOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.invoice_date.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^\\d{4}-\\d{2}-\\d{2}$","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.invoice_date.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.invoice_date","typeLabel":"string | null"},"due_date":{"oneOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.due_date.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^\\d{4}-\\d{2}-\\d{2}$","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.due_date.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.due_date","typeLabel":"string | null"},"total_incl_vat":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.total_incl_vat.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.total_incl_vat.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.total_incl_vat","typeLabel":"string | null"},"total_excl_vat":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.total_excl_vat.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.total_excl_vat.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.total_excl_vat","typeLabel":"string | null"},"currency":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.currency.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.currency.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.currency","typeLabel":"string | null"},"payment_reference":{"oneOf":[{"type":"string","description":"The KID or similar reference to pay with.","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.payment_reference.oneOf.0","typeLabel":"string"},{"type":"null","description":"The KID or similar reference to pay with.","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.payment_reference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0.payment_reference","typeLabel":"string | null"}},"required":["company_id","supplier_id","supplier_org_number","invoice_number","invoice_date","due_date","total_incl_vat","total_excl_vat","currency","payment_reference"],"description":"What the accounting system states about its copy; the invoice keeps what its file says. Totals are in the invoice's currency, a credit note negative. A field is null where the system does not state it, or before Watchdog has read it there; the object is null for a channel other than an accounting system.","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"company_id":{"oneOf":[{"type":"string"},{"type":"null"}]},"supplier_id":{"oneOf":[{"type":"string","description":"The supplier's ID in the accounting system."},{"type":"null","description":"The supplier's ID in the accounting system."}]},"supplier_org_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"invoice_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"invoice_date":{"oneOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}]},"due_date":{"oneOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}]},"total_incl_vat":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$"}]},"total_excl_vat":{"oneOf":[{"type":"string","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$"},{"type":"null","maxLength":100,"pattern":"^-?\\d+(?:\\.\\d+)?$"}]},"currency":{"oneOf":[{"type":"string"},{"type":"null"}]},"payment_reference":{"oneOf":[{"type":"string","description":"The KID or similar reference to pay with."},{"type":"null","description":"The KID or similar reference to pay with."}]}},"required":["company_id","supplier_id","supplier_org_number","invoice_number","invoice_date","due_date","total_incl_vat","total_excl_vat","currency","payment_reference"],"description":"What the accounting system states about its copy; the invoice keeps what its file says. Totals are in the invoice's currency, a credit note negative. A field is null where the system does not state it, or before Watchdog has read it there; the object is null for a channel other than an accounting system.","isRequired":true,"uniqueKey":"sources.items.[INDEX].stated.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].stated","typeLabel":"object | null"},"connection":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"sources.items.[INDEX].connection.oneOf.0.id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","isRequired":true,"uniqueKey":"sources.items.[INDEX].connection.oneOf.0.name","typeLabel":"string"}},"required":["id","name"],"description":"The connection that last read it; null when deleted or not an accounting system.","isRequired":true,"uniqueKey":"sources.items.[INDEX].connection.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"description":"The connection that last read it; null when deleted or not an accounting system.","isRequired":true,"uniqueKey":"sources.items.[INDEX].connection.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].connection","typeLabel":"object | null"},"peppol":{"oneOf":[{"type":"object","properties":{"message_id":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"sources.items.[INDEX].peppol.oneOf.0.message_id.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"sources.items.[INDEX].peppol.oneOf.0.message_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].peppol.oneOf.0.message_id","typeLabel":"string | null"},"sender":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"sources.items.[INDEX].peppol.oneOf.0.sender.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"sources.items.[INDEX].peppol.oneOf.0.sender.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].peppol.oneOf.0.sender","typeLabel":"string | null"},"receiver":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"sources.items.[INDEX].peppol.oneOf.0.receiver.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"sources.items.[INDEX].peppol.oneOf.0.receiver.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].peppol.oneOf.0.receiver","typeLabel":"string | null"},"document_type":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"sources.items.[INDEX].peppol.oneOf.0.document_type.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"sources.items.[INDEX].peppol.oneOf.0.document_type.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].peppol.oneOf.0.document_type","typeLabel":"string | null"}},"required":["message_id","sender","receiver","document_type"],"description":"How a Peppol message reached Watchdog: AS4 message ID and the SBDH parties.","isRequired":true,"uniqueKey":"sources.items.[INDEX].peppol.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"message_id":{"oneOf":[{"type":"string"},{"type":"null"}]},"sender":{"oneOf":[{"type":"string"},{"type":"null"}]},"receiver":{"oneOf":[{"type":"string"},{"type":"null"}]},"document_type":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["message_id","sender","receiver","document_type"],"description":"How a Peppol message reached Watchdog: AS4 message ID and the SBDH parties.","isRequired":true,"uniqueKey":"sources.items.[INDEX].peppol.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sources.items.[INDEX].peppol","typeLabel":"object | null"}},"required":["id","channel","linked","state","received_at","document_id","source_system","source_invoice_id","outstanding_amount","approval_status","stated","connection","peppol"],"uniqueKey":"sources.items.[INDEX]","typeLabel":"object"},"description":"Every arrival of this invoice, in the order received: an accounting system, a Peppol message, an email attachment, an upload or an API import. The first created the invoice; later ones are linked.","isRequired":true,"uniqueKey":"sources","typeLabel":"object[]"},"approval_evaluation":{"oneOf":[{"type":"object","properties":{"outcome":{"type":"string","enum":["rejected","approved","none"],"description":"What the policy decided; `none`: a person decides.","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.outcome","typeLabel":"enum\u003cstring>"},"evaluated_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.evaluated_at","typeLabel":"string\u003cdate-time>"},"conditions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The condition key.","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX].key","typeLabel":"string"},"passed":{"type":"boolean","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX].passed","typeLabel":"boolean"},"sentence":{"type":"string","description":"What was found, in English, e.g. \"Coding uncertain on line 3\".","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX].sentence","typeLabel":"string"},"reason":{"oneOf":[{"type":"string","enum":["read_with_confidence","amounts_do_not_add_up","low_confidence","coding_certain","coding_unavailable","already_booked","coding_not_finished","coding_incomplete","coding_uncertain","no_open_alerts","checks_running","checks_failed","open_alerts","amount_under","no_amount_limit","amount_missing","amount_over","amount_other_currency","same_as_always","same_as_always_off","same_as_always_unreadable","same_as_always_too_few","same_as_always_currency","same_as_always_lines","same_as_always_amount",null],"description":"Stable code for the sentence; null on older evaluations.","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX].reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["read_with_confidence","amounts_do_not_add_up","low_confidence","coding_certain","coding_unavailable","already_booked","coding_not_finished","coding_incomplete","coding_uncertain","no_open_alerts","checks_running","checks_failed","open_alerts","amount_under","no_amount_limit","amount_missing","amount_over","amount_other_currency","same_as_always","same_as_always_off","same_as_always_unreadable","same_as_always_too_few","same_as_always_currency","same_as_always_lines","same_as_always_amount",null],"description":"Stable code for the sentence; null on older evaluations.","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX].reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX].reason","typeLabel":"enum\u003cstring> | null"},"line":{"oneOf":[{"type":"integer","description":"The invoice line the sentence names, if any.","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX].line.oneOf.0","typeLabel":"integer"},{"type":"null","description":"The invoice line the sentence names, if any.","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX].line.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX].line","typeLabel":"integer | null"},"amount":{"oneOf":[{"type":"string","description":"The amount limit, for the amount reasons.","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX].amount.oneOf.0","typeLabel":"string"},{"type":"null","description":"The amount limit, for the amount reasons.","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX].amount.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX].amount","typeLabel":"string | null"},"currency":{"oneOf":[{"type":"string","description":"The limit's currency (the organization's).","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX].currency.oneOf.0","typeLabel":"string"},{"type":"null","description":"The limit's currency (the organization's).","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX].currency.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX].currency","typeLabel":"string | null"},"count":{"oneOf":[{"type":"integer","description":"Open alerts, or invoices compared for same_as_always reasons.","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX].count.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Open alerts, or invoices compared for same_as_always reasons.","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX].count.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX].count","typeLabel":"integer | null"},"tolerance_pct":{"oneOf":[{"type":"number","description":"Amount tolerance in %, for same_as_always reasons.","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX].tolerance_pct.oneOf.0","typeLabel":"number"},{"type":"null","description":"Amount tolerance in %, for same_as_always reasons.","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX].tolerance_pct.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX].tolerance_pct","typeLabel":"number | null"}},"required":["key","passed","sentence","reason","line","amount","currency","count","tolerance_pct"],"uniqueKey":"approval_evaluation.oneOf.0.conditions.items.[INDEX]","typeLabel":"object"},"description":"Every condition, in display order.","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.conditions","typeLabel":"object[]"},"not_approved_reason":{"oneOf":[{"type":"string","enum":["read_with_confidence","coding_certain","no_open_alerts","amount_under_limit","same_as_always",null],"description":"The condition that kept auto approve from approving.","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.not_approved_reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["read_with_confidence","coding_certain","no_open_alerts","amount_under_limit","same_as_always",null],"description":"The condition that kept auto approve from approving.","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.not_approved_reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0.not_approved_reason","typeLabel":"enum\u003cstring> | null"}},"required":["outcome","evaluated_at","conditions","not_approved_reason"],"description":"The approval policy's evaluation, made once the invoice settled; null until then.","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"outcome":{"type":"string","enum":["rejected","approved","none"],"description":"What the policy decided; `none`: a person decides."},"evaluated_at":{"type":"string","format":"date-time"},"conditions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The condition key."},"passed":{"type":"boolean"},"sentence":{"type":"string","description":"What was found, in English, e.g. \"Coding uncertain on line 3\"."},"reason":{"oneOf":[{"type":"string","enum":["read_with_confidence","amounts_do_not_add_up","low_confidence","coding_certain","coding_unavailable","already_booked","coding_not_finished","coding_incomplete","coding_uncertain","no_open_alerts","checks_running","checks_failed","open_alerts","amount_under","no_amount_limit","amount_missing","amount_over","amount_other_currency","same_as_always","same_as_always_off","same_as_always_unreadable","same_as_always_too_few","same_as_always_currency","same_as_always_lines","same_as_always_amount",null],"description":"Stable code for the sentence; null on older evaluations."},{"type":"null","enum":["read_with_confidence","amounts_do_not_add_up","low_confidence","coding_certain","coding_unavailable","already_booked","coding_not_finished","coding_incomplete","coding_uncertain","no_open_alerts","checks_running","checks_failed","open_alerts","amount_under","no_amount_limit","amount_missing","amount_over","amount_other_currency","same_as_always","same_as_always_off","same_as_always_unreadable","same_as_always_too_few","same_as_always_currency","same_as_always_lines","same_as_always_amount",null],"description":"Stable code for the sentence; null on older evaluations."}]},"line":{"oneOf":[{"type":"integer","description":"The invoice line the sentence names, if any."},{"type":"null","description":"The invoice line the sentence names, if any."}]},"amount":{"oneOf":[{"type":"string","description":"The amount limit, for the amount reasons."},{"type":"null","description":"The amount limit, for the amount reasons."}]},"currency":{"oneOf":[{"type":"string","description":"The limit's currency (the organization's)."},{"type":"null","description":"The limit's currency (the organization's)."}]},"count":{"oneOf":[{"type":"integer","description":"Open alerts, or invoices compared for same_as_always reasons."},{"type":"null","description":"Open alerts, or invoices compared for same_as_always reasons."}]},"tolerance_pct":{"oneOf":[{"type":"number","description":"Amount tolerance in %, for same_as_always reasons."},{"type":"null","description":"Amount tolerance in %, for same_as_always reasons."}]}},"required":["key","passed","sentence","reason","line","amount","currency","count","tolerance_pct"]},"description":"Every condition, in display order."},"not_approved_reason":{"oneOf":[{"type":"string","enum":["read_with_confidence","coding_certain","no_open_alerts","amount_under_limit","same_as_always",null],"description":"The condition that kept auto approve from approving."},{"type":"null","enum":["read_with_confidence","coding_certain","no_open_alerts","amount_under_limit","same_as_always",null],"description":"The condition that kept auto approve from approving."}]}},"required":["outcome","evaluated_at","conditions","not_approved_reason"],"description":"The approval policy's evaluation, made once the invoice settled; null until then.","isRequired":true,"uniqueKey":"approval_evaluation.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval_evaluation","typeLabel":"object | null"},"effects":{"type":"object","properties":{"updated":{"type":"array","items":{"type":"string","enum":["agreements","credit_notes","duplicates","purchase_orders","reminders"],"uniqueKey":"effects.updated.items.[INDEX]","typeLabel":"enum\u003cstring>"},"description":"The invoice's related data this change updated, to read again: its agreements, credit-note links, duplicate findings, purchase orders, reminders, and with any of them its alerts. Empty when nothing besides the invoice changed, as for a title.","isRequired":true,"uniqueKey":"effects.updated","typeLabel":"enum\u003cstring>[]"},"started":{"type":"array","items":{"type":"string","enum":["agreements","credit_notes","purchase_orders"],"uniqueKey":"effects.started.items.[INDEX]","typeLabel":"enum\u003cstring>"},"description":"Background areas this change started or joined, for this invoice or a related one you can see. Their results land when the runs finish; follow them in background_runs.","isRequired":true,"uniqueKey":"effects.started","typeLabel":"enum\u003cstring>[]"}},"required":["updated","started"],"isRequired":true,"uniqueKey":"effects","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"company_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","suggested_company_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","url":"\u003cstring>","invoice_number":"\u003cstring>","title":"\u003cstring>","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":"\u003cstring>","invoiced_as":{"name":"\u003cstring>","organization_number":"\u003cstring>","main_name":"\u003cstring>","department":"\u003cstring>","email":"\u003cstring>","website":"\u003cstring>","address":{"street":"\u003cstring>","city":"\u003cstring>","state":"\u003cstring>","postal_code":"\u003cstring>","country_code":"\u003cstring>"}}},"recipient":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"\u003cstring>","invoiced_as":{"name":"\u003cstring>","organization_number":"\u003cstring>","main_name":"\u003cstring>","department":"\u003cstring>","email":"\u003cstring>","website":"\u003cstring>","address":{"street":"\u003cstring>","city":"\u003cstring>","state":"\u003cstring>","postal_code":"\u003cstring>","country_code":"\u003cstring>"}}},"amounts":{"currency_code":"\u003cstring>","excluding_vat":"1250.00","including_vat":"1250.00","prepaid":"1250.00","rounding":"1250.00","payable":"1250.00","original":{"currency_code":"\u003cstring>","including_vat":"1250.00","conversion_rate":"1250.00"},"valid":true,"errors":[{"code":"missing_financial_inputs","field":"\u003cstring>","message":"\u003cstring>"}],"transfer_mismatches":["\u003cstring>"]},"review":{"recommended":true,"extraction_confidence":"high","confirmed":{"at":"2023-11-07T05:31:56Z","by_user_id":"\u003cstring>"}},"stage":"inbox","outside_flow":"cancelled_in_source","lifecycle":{"status":"reading","phase":"inbox","blockers":["no_company"],"review_issues":["needs_review"],"closed_on":"2023-12-25","next_action":{"kind":"review","mine":true,"waiting_on":["\u003cstring>"]}},"accounting":{"system_name":"\u003cstring>","link":{"url":"\u003cstring>","system_name":"\u003cstring>"},"approval":"approved","rejection":{"by":"\u003cstring>","role":"\u003cstring>","comment":"\u003cstring>"},"booking":{"system_name":"\u003cstring>"},"not_booked":true,"status":{"kind":"paid","system_name":"\u003cstring>","sent_at":"2023-11-07T05:31:56Z"}},"overdue":true,"approvers":[{"user_id":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","email":"\u003cstring>","approved":true,"source":"person","rule_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","rule_name":"\u003cstring>","purchase_order":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","number":"\u003cstring>"},"added_by":{"user_id":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","email":"\u003cstring>"},"step":2}],"approver_teams":[{"team_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"\u003cstring>","approved":true,"approved_by":{"user_id":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","email":"\u003cstring>"},"source":"person","rule_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","rule_name":"\u003cstring>","purchase_order":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","number":"\u003cstring>"},"added_by":{"user_id":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","email":"\u003cstring>"},"members":[{"user_id":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","email":"\u003cstring>"}],"nobody_can_act":true,"step":2}],"required_approvals":2,"assigning_approvers":true,"policy_approval":"waiting","background_runs":[{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","area":"agreements","status":"queued","failed_steps":[{"step":"smart_match","failure":{"code":"\u003cstring>","message":"\u003cstring>"}}],"waiting_for_import":true,"retry_at":"2023-11-07T05:31:56Z","finished_at":"2023-11-07T05:31:56Z"}],"alerts":{"status":"credited","check_status":"not_checkable","open_alert_count":1,"counts":{"pending":{"credited":1,"uncredited":1},"accepted":{"credited":1,"uncredited":1},"dismissed":{"credited":1,"uncredited":1},"skipped":{"credited":1,"uncredited":1}},"replaceable_alert_count":1,"agreements":{"total":1,"checked":1},"scope":{"type":"invoice","agreement_ids":["3c90c3cc-0d44-4b50-8888-8dd25736052a"]},"has_hidden_alerts":true},"checks":[{"check_type":"agreement","status":"not_started","reason":"matching","open_alert_count":1,"review_alert_count":1,"complete":true}],"check_progress":"running","relationships":{"letter_count":1,"agreement_count":1,"alert_count":1,"linked_credit_note_count":1,"matched_invoice_count":1,"line_item_count":1,"document_count":1},"current_step":2,"letter":{"printed_stage":"\u003cstring>","amount_demanded":"\u003cstring>","charges_known":true,"sender":{"name":"\u003cstring>","registration_number":"\u003cstring>","registration_country":"\u003cstring>","vat_number":"\u003cstring>","vat_country":"\u003cstring>"},"payee":{"name":"\u003cstring>","registration_number":"\u003cstring>","registration_country":"\u003cstring>","vat_number":"\u003cstring>","vat_country":"\u003cstring>"},"payments":[{"amount":"\u003cstring>","paid_on":"\u003cstring>"}],"issues":["charges_unknown"],"source_discrepancies":[{"field":"amount_demanded","xml_value":"\u003cstring>","pdf_value":"\u003cstring>"}],"claims":[{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","stated_invoice_number":"\u003cstring>","stated_issued_date":"2023-12-25","stated_due_date":"2023-12-25","stated_original_amount":"\u003cstring>","stated_outstanding_amount":"\u003cstring>","stated_payment_reference":"\u003cstring>","original_status":"matched","original":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","invoice_number":"\u003cstring>","issued_date":"2023-12-25","accounting":{"status":"settled","paid_on":"2023-12-25","read_at":"2023-11-07T05:31:56Z"}},"accounting_lookup":{"can_lookup":true,"connections":[{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"\u003cstring>"}],"status":"searching","looked_up_at":"2023-11-07T05:31:56Z","paid_on":"2023-12-25"},"included_original_recovery":{"can_import":true,"suggested_pages":{"document_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","start_page":123,"end_page":123},"sources":[{"document_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","file_name":"\u003cstring>","page_count":123}]},"can_link":true}],"charges":[{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","kind":"fee","description":"\u003cstring>","amount":"\u003cstring>","claim_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a"}],"lines":[{"kind":"fee","printed":"\u003cstring>","booked_earlier":"\u003cstring>","to_book":"\u003cstring>","line_item_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a"}],"amount_owed":{"currency":"\u003cstring>","lines":[{"invoice_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","invoice_number":"\u003cstring>","issued_date":"2023-12-25","kind":"invoice","letter_category":"reminder","amount":"\u003cstring>","source":"accounting_system","read_at":"2023-11-07T05:31:56Z"}],"total":"\u003cstring>","charges":"\u003cstring>","claimed":"\u003cstring>","difference":"\u003cstring>"},"flags":{"new_account":true,"settled_original":true,"missing_original":true},"can_link_claims":true},"payment_handoff":{"state":"ready","reason":"collector","letter":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","category":"reminder","issued_date":"2023-12-25"},"payee":"\u003cstring>","account":"\u003cstring>","reference":"\u003cstring>","reference_kind":"\u003cstring>","due_date":"2023-12-25"},"amount_owed":{"currency":"\u003cstring>","lines":[{"invoice_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","invoice_number":"\u003cstring>","issued_date":"2023-12-25","kind":"invoice","letter_category":"reminder","amount":"\u003cstring>","source":"accounting_system","read_at":"2023-11-07T05:31:56Z"}],"total":"\u003cstring>","charges":"\u003cstring>","claimed":"\u003cstring>","difference":"\u003cstring>"},"suggested_approvers":[{"user_id":"\u003cstring>","team_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"\u003cstring>","purchase_order":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","number":"\u003cstring>"}}],"note":"\u003cstring>","payment":{"status":"paid","paid_mark":{"paid_on":"2023-12-25","at":"2023-11-07T05:31:56Z","by":{"user_id":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","email":"\u003cstring>"}},"can_mark_paid":true,"terms":"\u003cstring>","reference":"\u003cstring>","reference_kind":"kid","bank_account_number":"\u003cstring>","outstanding":{"current":true,"amount":"1250.00","read_at":"2023-11-07T05:31:56Z","unreadable_since":"2023-11-07T05:31:56Z"}},"delivery":{"name":"\u003cstring>","address":{"street":"\u003cstring>","city":"\u003cstring>","state":"\u003cstring>","postal_code":"\u003cstring>","country_code":"\u003cstring>"},"date":"2023-12-25"},"references":{"order_references":["\u003cstring>"],"buyer_reference":"\u003cstring>","seller_reference":"\u003cstring>","buyer_contact":{"name":"\u003cstring>","email":"\u003cstring>"},"contract_reference":"\u003cstring>","project_reference":"\u003cstring>","accounting_cost":"\u003cstring>","credit_note_invoice_reference":"\u003cstring>"},"additional_properties":[{"name":"\u003cstring>","value":"\u003cstring>","source_path":"\u003cstring>","scheme":"\u003cstring>"}],"approval":{"decision":"approved","decided_at":"2023-11-07T05:31:56Z","decided_by":{"user_id":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","email":"\u003cstring>"},"decided_by_kind":"person","reason":"\u003cstring>"},"sent_back":{"at":"2023-11-07T05:31:56Z","by":{"user_id":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","email":"\u003cstring>"},"reason":"\u003cstring>"},"progress":[{"step":"received","status":"done","state":"received","actor":{"user_id":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","email":"\u003cstring>"},"at":"2023-11-07T05:31:56Z","detail":"\u003cstring>"}],"hold":{"since":"2023-11-07T05:31:56Z","by":{"user_id":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","email":"\u003cstring>"},"reason":"\u003cstring>"},"locked":true,"intake":{"status":"missing_info","missing":["company"]},"actions":{"edit":{"allowed":true,"reason":"deleted"},"edit_approvers":{"allowed":true,"reason":"deleted"},"run_checks":{"allowed":true,"reason":"deleted"},"suggest_coding":{"allowed":true,"reason":"deleted"},"code":{"allowed":true,"reason":"deleted"},"send_for_approval":{"allowed":true,"reason":"deleted"},"pull_back":{"allowed":true,"reason":"deleted"},"reopen":{"allowed":true,"reason":"deleted"},"close":{"allowed":true,"reason":"deleted"},"hold":{"allowed":true,"reason":"deleted"}},"voucher":{"number":"\u003cstring>","postings":[{"kind":"cost","account":"\u003cstring>","vat_code":"\u003cstring>","dimensions":["\u003cstring>"],"amount":"1250.00","amount_gross":"1250.00"}]},"transfer":{"status":"not_sent","system_name":"\u003cstring>","connection":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"\u003cstring>","provider":"\u003cstring>"},"voucher_id":"\u003cstring>","at":"2023-11-07T05:31:56Z","supplier_bank_account":"same","failure":{"code":"unsupported_category","message":"\u003cstring>","retryable":true},"booking_failure":{"code":"approval_required","message":"\u003cstring>","retryable":true},"blocked":{"code":"not_coded","message":"\u003cstring>","connection":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"\u003cstring>","provider":"\u003cstring>"}},"deleted_in_accounting_system":{"voucher_id":"\u003cstring>","at":"2023-11-07T05:31:56Z"}},"origin":{"type":"structured","import_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a"},"sources":[{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","channel":"upload","linked":true,"state":"active","received_at":"2023-11-07T05:31:56Z","document_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","source_system":"\u003cstring>","source_invoice_id":"\u003cstring>","outstanding_amount":"\u003cstring>","approval_status":"pending","stated":{"company_id":"\u003cstring>","supplier_id":"\u003cstring>","supplier_org_number":"\u003cstring>","invoice_number":"\u003cstring>","invoice_date":"\u003cstring>","due_date":"\u003cstring>","total_incl_vat":"\u003cstring>","total_excl_vat":"\u003cstring>","currency":"\u003cstring>","payment_reference":"\u003cstring>"},"connection":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"\u003cstring>"},"peppol":{"message_id":"\u003cstring>","sender":"\u003cstring>","receiver":"\u003cstring>","document_type":"\u003cstring>"}}],"approval_evaluation":{"outcome":"rejected","evaluated_at":"2023-11-07T05:31:56Z","conditions":[{"key":"\u003cstring>","passed":true,"sentence":"\u003cstring>","reason":"read_with_confidence","line":123,"amount":"\u003cstring>","currency":"\u003cstring>","count":123,"tolerance_pct":123}],"not_approved_reason":"read_with_confidence"},"effects":{"updated":["agreements"],"started":["agreements"]}}}},"exampleType":"generated"}},"exampleType":"generated"},"4d172120-f214-4bcf-aa08-0b1a402d19e9":{"description":"No recipient could be placed in the company, from the invoice or from the company itself. Nothing is saved.","headers":{"X-Request-Id":{"schema":{"type":"string"},"required":true,"description":"Request ID, also included in error bodies. Include it when contacting support."},"Cache-Control":{"schema":{"type":"string","enum":["private, no-store","private, no-store, no-transform"]},"required":false,"description":"API responses are private and must not be cached."},"X-RateLimit-Limit":{"schema":{"type":"string","example":"500"},"required":false,"description":"Requests allowed per minute for this credential, or failed API key attempts allowed per minute from this IP address."}},"content":{"application/json":{"example":{"error":{"code":"validation_error","message":"No recipient could be placed in the company, from the invoice or from the company itself. Nothing is saved.","request_id":"req_example"}},"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_error"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"description":{"type":"string","uniqueKey":"error.description","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].code","typeLabel":"string"},"field":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"}},"required":["code","field","message"],"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"maxItems":20,"uniqueKey":"error.details","typeLabel":"object[]"},"workflow_run_id":{"type":"string","format":"uuid","uniqueKey":"error.workflow_run_id","typeLabel":"string\u003cuuid>"},"import_id":{"type":"string","format":"uuid","uniqueKey":"error.import_id","typeLabel":"string\u003cuuid>"},"existing_party":{"type":"object","properties":{"type":{"type":"string","enum":["supplier","recipient"],"isRequired":true,"uniqueKey":"error.existing_party.type","typeLabel":"enum\u003cstring>"},"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"error.existing_party.id","typeLabel":"string\u003cuuid>"}},"required":["type","id"],"uniqueKey":"error.existing_party","typeLabel":"object"}},"required":["code","message","request_id"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"validation_error","message":"No recipient could be placed in the company, from the invoice or from the company itself. Nothing is saved.","request_id":"req_example"}}}},"exampleType":"examples"}},"exampleType":"examples"},"8e0ead0b-8af3-43b5-b3da-940802cee1f8":{"description":"The bearer token is missing or invalid.","headers":{"X-Request-Id":{"schema":{"type":"string"},"required":true,"description":"Request ID, also included in error bodies. Include it when contacting support."},"Cache-Control":{"schema":{"type":"string","enum":["private, no-store","private, no-store, no-transform"]},"required":false,"description":"API responses are private and must not be cached."},"X-RateLimit-Limit":{"schema":{"type":"string","example":"500"},"required":false,"description":"Requests allowed per minute for this credential, or failed API key attempts allowed per minute from this IP address."},"WWW-Authenticate":{"schema":{"type":"string"},"required":false,"description":"Bearer authentication challenge, when supplied."}},"content":{"application/json":{"example":{"error":{"code":"invalid_token","message":"The bearer token is missing or invalid.","request_id":"req_example"}},"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_token"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"description":{"type":"string","uniqueKey":"error.description","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].code","typeLabel":"string"},"field":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"}},"required":["code","field","message"],"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"maxItems":20,"uniqueKey":"error.details","typeLabel":"object[]"},"workflow_run_id":{"type":"string","format":"uuid","uniqueKey":"error.workflow_run_id","typeLabel":"string\u003cuuid>"},"import_id":{"type":"string","format":"uuid","uniqueKey":"error.import_id","typeLabel":"string\u003cuuid>"},"existing_party":{"type":"object","properties":{"type":{"type":"string","enum":["supplier","recipient"],"isRequired":true,"uniqueKey":"error.existing_party.type","typeLabel":"enum\u003cstring>"},"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"error.existing_party.id","typeLabel":"string\u003cuuid>"}},"required":["type","id"],"uniqueKey":"error.existing_party","typeLabel":"object"}},"required":["code","message","request_id"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"invalid_token","message":"The bearer token is missing or invalid.","request_id":"req_example"}}}},"exampleType":"examples"}},"exampleType":"examples"},"e4bbfa3b-0c22-42e1-9b43-c78d19aac995":{"description":"Access denied. The error code says why: forbidden, token_disabled, organization_required, insufficient_role or mfa_required.","headers":{"X-Request-Id":{"schema":{"type":"string"},"required":true,"description":"Request ID, also included in error bodies. Include it when contacting support."},"Cache-Control":{"schema":{"type":"string","enum":["private, no-store","private, no-store, no-transform"]},"required":false,"description":"API responses are private and must not be cached."},"X-RateLimit-Limit":{"schema":{"type":"string","example":"500"},"required":false,"description":"Requests allowed per minute for this credential, or failed API key attempts allowed per minute from this IP address."}},"content":{"application/json":{"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"}},"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","token_disabled","organization_required","insufficient_role","mfa_required"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"description":{"type":"string","uniqueKey":"error.description","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].code","typeLabel":"string"},"field":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"}},"required":["code","field","message"],"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"maxItems":20,"uniqueKey":"error.details","typeLabel":"object[]"},"workflow_run_id":{"type":"string","format":"uuid","uniqueKey":"error.workflow_run_id","typeLabel":"string\u003cuuid>"},"import_id":{"type":"string","format":"uuid","uniqueKey":"error.import_id","typeLabel":"string\u003cuuid>"},"existing_party":{"type":"object","properties":{"type":{"type":"string","enum":["supplier","recipient"],"isRequired":true,"uniqueKey":"error.existing_party.type","typeLabel":"enum\u003cstring>"},"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"error.existing_party.id","typeLabel":"string\u003cuuid>"}},"required":["type","id"],"uniqueKey":"error.existing_party","typeLabel":"object"}},"required":["code","message","request_id"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"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"}}}},"exampleType":"examples"}},"exampleType":"examples"},"ff73a013-8944-4d98-860c-c69f19d4e3d4":{"description":"The resource does not exist in the current organization.","headers":{"X-Request-Id":{"schema":{"type":"string"},"required":true,"description":"Request ID, also included in error bodies. Include it when contacting support."},"Cache-Control":{"schema":{"type":"string","enum":["private, no-store","private, no-store, no-transform"]},"required":false,"description":"API responses are private and must not be cached."},"X-RateLimit-Limit":{"schema":{"type":"string","example":"500"},"required":false,"description":"Requests allowed per minute for this credential, or failed API key attempts allowed per minute from this IP address."}},"content":{"application/json":{"example":{"error":{"code":"not_found","message":"The resource does not exist in the current organization.","request_id":"req_example"}},"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"description":{"type":"string","uniqueKey":"error.description","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].code","typeLabel":"string"},"field":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"}},"required":["code","field","message"],"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"maxItems":20,"uniqueKey":"error.details","typeLabel":"object[]"},"workflow_run_id":{"type":"string","format":"uuid","uniqueKey":"error.workflow_run_id","typeLabel":"string\u003cuuid>"},"import_id":{"type":"string","format":"uuid","uniqueKey":"error.import_id","typeLabel":"string\u003cuuid>"},"existing_party":{"type":"object","properties":{"type":{"type":"string","enum":["supplier","recipient"],"isRequired":true,"uniqueKey":"error.existing_party.type","typeLabel":"enum\u003cstring>"},"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"error.existing_party.id","typeLabel":"string\u003cuuid>"}},"required":["type","id"],"uniqueKey":"error.existing_party","typeLabel":"object"}},"required":["code","message","request_id"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"not_found","message":"The resource does not exist in the current organization.","request_id":"req_example"}}}},"exampleType":"examples"}},"exampleType":"examples"},"8fb662d6-f111-403a-bbc4-02dd02940dfa":{"description":"The invoice or its recipient already belongs to another company, or the company already has the same invoice.","headers":{"X-Request-Id":{"schema":{"type":"string"},"required":true,"description":"Request ID, also included in error bodies. Include it when contacting support."},"Cache-Control":{"schema":{"type":"string","enum":["private, no-store","private, no-store, no-transform"]},"required":false,"description":"API responses are private and must not be cached."},"X-RateLimit-Limit":{"schema":{"type":"string","example":"500"},"required":false,"description":"Requests allowed per minute for this credential, or failed API key attempts allowed per minute from this IP address."}},"content":{"application/json":{"example":{"error":{"code":"conflict","message":"The invoice or its recipient already belongs to another company, or the company already has the same invoice.","request_id":"req_example"}},"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"description":{"type":"string","uniqueKey":"error.description","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].code","typeLabel":"string"},"field":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"}},"required":["code","field","message"],"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"maxItems":20,"uniqueKey":"error.details","typeLabel":"object[]"},"workflow_run_id":{"type":"string","format":"uuid","uniqueKey":"error.workflow_run_id","typeLabel":"string\u003cuuid>"},"import_id":{"type":"string","format":"uuid","uniqueKey":"error.import_id","typeLabel":"string\u003cuuid>"},"existing_party":{"type":"object","properties":{"type":{"type":"string","enum":["supplier","recipient"],"isRequired":true,"uniqueKey":"error.existing_party.type","typeLabel":"enum\u003cstring>"},"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"error.existing_party.id","typeLabel":"string\u003cuuid>"}},"required":["type","id"],"uniqueKey":"error.existing_party","typeLabel":"object"}},"required":["code","message","request_id"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"conflict","message":"The invoice or its recipient already belongs to another company, or the company already has the same invoice.","request_id":"req_example"}}}},"exampleType":"examples"}},"exampleType":"examples"},"76ba7507-779e-4630-9974-b136f16259bd":{"description":"Too many requests. Wait for the Retry-After delay before retrying.","headers":{"X-Request-Id":{"schema":{"type":"string"},"required":true,"description":"Request ID, also included in error bodies. Include it when contacting support."},"Cache-Control":{"schema":{"type":"string","enum":["private, no-store","private, no-store, no-transform"]},"required":false,"description":"API responses are private and must not be cached."},"X-RateLimit-Limit":{"schema":{"type":"string","example":"500"},"required":false,"description":"Requests allowed per minute for this credential, or failed API key attempts allowed per minute from this IP address."},"Retry-After":{"schema":{"type":"string","example":"60"},"required":true,"description":"Seconds to wait before retrying the request."}},"content":{"application/json":{"example":{"error":{"code":"rate_limit_exceeded","message":"Too many requests. Wait for the Retry-After delay before retrying.","request_id":"req_example"}},"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"description":{"type":"string","uniqueKey":"error.description","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].code","typeLabel":"string"},"field":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"}},"required":["code","field","message"],"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"maxItems":20,"uniqueKey":"error.details","typeLabel":"object[]"},"workflow_run_id":{"type":"string","format":"uuid","uniqueKey":"error.workflow_run_id","typeLabel":"string\u003cuuid>"},"import_id":{"type":"string","format":"uuid","uniqueKey":"error.import_id","typeLabel":"string\u003cuuid>"},"existing_party":{"type":"object","properties":{"type":{"type":"string","enum":["supplier","recipient"],"isRequired":true,"uniqueKey":"error.existing_party.type","typeLabel":"enum\u003cstring>"},"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"error.existing_party.id","typeLabel":"string\u003cuuid>"}},"required":["type","id"],"uniqueKey":"error.existing_party","typeLabel":"object"}},"required":["code","message","request_id"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"rate_limit_exceeded","message":"Too many requests. Wait for the Retry-After delay before retrying.","request_id":"req_example"}}}},"exampleType":"examples"}},"exampleType":"examples"},"ad91cd2a-62f7-4bcb-81b2-d12be6a3b9e2":{"description":"Unexpected server failure. Include the request ID when contacting support.","headers":{"X-Request-Id":{"schema":{"type":"string"},"required":true,"description":"Request ID, also included in error bodies. Include it when contacting support."},"Cache-Control":{"schema":{"type":"string","enum":["private, no-store","private, no-store, no-transform"]},"required":false,"description":"API responses are private and must not be cached."},"X-RateLimit-Limit":{"schema":{"type":"string","example":"500"},"required":false,"description":"Requests allowed per minute for this credential, or failed API key attempts allowed per minute from this IP address."}},"content":{"application/json":{"example":{"error":{"code":"internal_error","message":"Unexpected server failure. Include the request ID when contacting support.","request_id":"req_example"}},"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"description":{"type":"string","uniqueKey":"error.description","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].code","typeLabel":"string"},"field":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"}},"required":["code","field","message"],"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"maxItems":20,"uniqueKey":"error.details","typeLabel":"object[]"},"workflow_run_id":{"type":"string","format":"uuid","uniqueKey":"error.workflow_run_id","typeLabel":"string\u003cuuid>"},"import_id":{"type":"string","format":"uuid","uniqueKey":"error.import_id","typeLabel":"string\u003cuuid>"},"existing_party":{"type":"object","properties":{"type":{"type":"string","enum":["supplier","recipient"],"isRequired":true,"uniqueKey":"error.existing_party.type","typeLabel":"enum\u003cstring>"},"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"error.existing_party.id","typeLabel":"string\u003cuuid>"}},"required":["type","id"],"uniqueKey":"error.existing_party","typeLabel":"object"}},"required":["code","message","request_id"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"internal_error","message":"Unexpected server failure. Include the request ID when contacting support.","request_id":"req_example"}}}},"exampleType":"examples"}},"exampleType":"examples"},"ca38d68a-9b68-49be-9637-d92fa7389dda":{"description":"Temporarily unavailable. Retry after the Retry-After delay, when provided.","headers":{"X-Request-Id":{"schema":{"type":"string"},"required":true,"description":"Request ID, also included in error bodies. Include it when contacting support."},"Cache-Control":{"schema":{"type":"string","enum":["private, no-store","private, no-store, no-transform"]},"required":false,"description":"API responses are private and must not be cached."},"X-RateLimit-Limit":{"schema":{"type":"string","example":"500"},"required":false,"description":"Requests allowed per minute for this credential, or failed API key attempts allowed per minute from this IP address."},"Retry-After":{"schema":{"type":"string","example":"60"},"required":true,"description":"Seconds to wait before retrying the request."}},"content":{"application/json":{"example":{"error":{"code":"service_unavailable","message":"Temporarily unavailable. Retry after the Retry-After delay, when provided.","request_id":"req_example"}},"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_unavailable"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"description":{"type":"string","uniqueKey":"error.description","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].code","typeLabel":"string"},"field":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"}},"required":["code","field","message"],"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"maxItems":20,"uniqueKey":"error.details","typeLabel":"object[]"},"workflow_run_id":{"type":"string","format":"uuid","uniqueKey":"error.workflow_run_id","typeLabel":"string\u003cuuid>"},"import_id":{"type":"string","format":"uuid","uniqueKey":"error.import_id","typeLabel":"string\u003cuuid>"},"existing_party":{"type":"object","properties":{"type":{"type":"string","enum":["supplier","recipient"],"isRequired":true,"uniqueKey":"error.existing_party.type","typeLabel":"enum\u003cstring>"},"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"error.existing_party.id","typeLabel":"string\u003cuuid>"}},"required":["type","id"],"uniqueKey":"error.existing_party","typeLabel":"object"}},"required":["code","message","request_id"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"service_unavailable","message":"Temporarily unavailable. Retry after the Retry-After delay, when provided.","request_id":"req_example"}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"363105f3-526e-452a-ac24-74b279de29ab":{"ApiKeyBearer":{"type":"http","scheme":"bearer","description":"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).","scopes":[],"schemeName":"ApiKeyBearer"}}},"servers":{"0f259b2e-ff56-4327-8143-523787cf2165":{"url":"https://api.watchdog.no","description":"Watchdog API"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"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).","scopes":[],"schemeName":"ApiKeyBearer"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"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).","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"ApiKeyBearer","name":"Authorization"}],"title":"ApiKeyBearer"}]},"originalFileLocation":"openapi.json"},"subdomain":"watchdog-7cea1057","siteName":"Watchdog Help Center","title":"Choose an invoice's company - Watchdog Help Center","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/endpoints/invoices/choose-an-invoices-company","matchLevel":0},"no":{"href":"/no","matchLevel":4}}},"lastModified":"2026-11-18T12:33:59.974Z","originalFileLocation":"api-reference/endpoints/invoices/choose-an-invoices-company.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Chooses the company of an invoice no rule placed (company_id null, found with without_company=true); suggested_company_id names the likely one. Its recipient becomes the party the invoice names, as its import read it, found or made in that company, or the company itself when it names none. The invoice then arrives in the company like a new invoice: approval rules give it approvers, and its coding and checks start. A reminder or collection notice instead starts recovering the originals it chases. Choosing the company it already has changes nothing. 409 when it already belongs to another company, when its recipient belongs to another company, or when the company already has the same invoice. Recorded in the invoice\u0026#x27;s activity.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Watchdog Help Center\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/watchdog-7cea1057/6F6OCFT8gZxc3FZT/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/watchdog-7cea1057/6F6OCFT8gZxc3FZT/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/watchdog-7cea1057/6F6OCFT8gZxc3FZT/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/watchdog-7cea1057/6F6OCFT8gZxc3FZT/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/watchdog-7cea1057/6F6OCFT8gZxc3FZT/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/watchdog-7cea1057/6F6OCFT8gZxc3FZT/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/watchdog-7cea1057/6F6OCFT8gZxc3FZT/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/watchdog-7cea1057/6F6OCFT8gZxc3FZT/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/watchdog-7cea1057/6F6OCFT8gZxc3FZT/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Choose an invoice\u0026#x27;s company - Watchdog Help Center\">\u003cmeta data-mint-head property=\"og:description\" content=\"Chooses the company of an invoice no rule placed (company_id null, found with without_company=true); suggested_company_id names the likely one. Its recipient becomes the party the invoice names, as its import read it, found or made in that company, or the company itself when it names none. The invoice then arrives in the company like a new invoice: approval rules give it approvers, and its coding and checks start. A reminder or collection notice instead starts recovering the originals it chases. Choosing the company it already has changes nothing. 409 when it already belongs to another company, when its recipient belongs to another company, or when the company already has the same invoice. Recorded in the invoice\u0026#x27;s activity.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Watchdog Help Center\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.watchdog.no/api-reference/endpoints/invoices/choose-an-invoices-company\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://watchdog-7cea1057.mintlify.site/_mintlify/api/og/v2?division=Invoices\u0026amp;title=Choose+an+invoice%27s+company\u0026amp;description=Chooses+the+company+of+an+invoice+no+rule+placed+%28company_id+null%2C+found+with+without_company%3Dtrue%29%3B+suggested_company_id+names+the+likely+one.+Its+recipient+be\u0026amp;theme=3ce0d3a3382d965df629a40c\u0026amp;signature=3a7b3995888b5d0215deb3e3b7e13eeaecc4a4d4168d5c5ab82cd9569cf9c025\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Choose an invoice\u0026#x27;s company - Watchdog Help Center\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Chooses the company of an invoice no rule placed (company_id null, found with without_company=true); suggested_company_id names the likely one. Its recipient becomes the party the invoice names, as its import read it, found or made in that company, or the company itself when it names none. The invoice then arrives in the company like a new invoice: approval rules give it approvers, and its coding and checks start. A reminder or collection notice instead starts recovering the originals it chases. Choosing the company it already has changes nothing. 409 when it already belongs to another company, when its recipient belongs to another company, or when the company already has the same invoice. Recorded in the invoice\u0026#x27;s activity.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://watchdog-7cea1057.mintlify.site/_mintlify/api/og/v2?division=Invoices\u0026amp;title=Choose+an+invoice%27s+company\u0026amp;description=Chooses+the+company+of+an+invoice+no+rule+placed+%28company_id+null%2C+found+with+without_company%3Dtrue%29%3B+suggested_company_id+names+the+likely+one.+Its+recipient+be\u0026amp;theme=3ce0d3a3382d965df629a40c\u0026amp;signature=3a7b3995888b5d0215deb3e3b7e13eeaecc4a4d4168d5c5ab82cd9569cf9c025\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/watchdog-7cea1057/6F6OCFT8gZxc3FZT/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Watchdog Help Center\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#534AB7\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.watchdog.no/api-reference/endpoints/invoices/choose-an-invoices-company\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoints/invoices/choose-an-invoices-company.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://watchdog.no/#organization\",\"name\":\"Watchdog\",\"url\":\"https://watchdog.no\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://docs.watchdog.no/assets/logo-light.svg\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.watchdog.no#website\",\"name\":\"Watchdog Help Center\",\"url\":\"https://docs.watchdog.no\",\"publisher\":{\"@id\":\"https://watchdog.no/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.watchdog.no/api-reference/endpoints/invoices/choose-an-invoices-company#webpage\",\"url\":\"https://docs.watchdog.no/api-reference/endpoints/invoices/choose-an-invoices-company\",\"name\":\"Choose an invoice's company\",\"description\":\"Chooses the company of an invoice no rule placed (company_id null, found with without_company=true); suggested_company_id names the likely one. Its recipient becomes the party the invoice names, as its import read it, found or made in that company, or the company itself when it names none. The invoice then arrives in the company like a new invoice: approval rules give it approvers, and its coding and checks start. A reminder or collection notice instead starts recovering the originals it chases. Choosing the company it already has changes nothing. 409 when it already belongs to another company, when its recipient belongs to another company, or when the company already has the same invoice. Recorded in the invoice's activity.\",\"dateModified\":\"2026-11-18T12:33:59.974Z\",\"isPartOf\":{\"@id\":\"https://docs.watchdog.no#website\"},\"breadcrumb\":{\"@id\":\"https://docs.watchdog.no/api-reference/endpoints/invoices/choose-an-invoices-company#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.watchdog.no/api-reference/endpoints/invoices/choose-an-invoices-company#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.watchdog.no/api-reference/endpoints/overview/get-the-organization-overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Invoices\",\"item\":\"https://docs.watchdog.no/api-reference/endpoints/invoices/total-invoice-spend-overall-or-per-supplier-recipient-or-month\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Choose an invoice's company\",\"item\":\"https://docs.watchdog.no/api-reference/endpoints/invoices/choose-an-invoices-company\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.watchdog.no/api-reference/endpoints/invoices/choose-an-invoices-company#apireference\",\"headline\":\"Choose an invoice's company\",\"name\":\"Choose an invoice's company\",\"description\":\"Chooses the company of an invoice no rule placed (company_id null, found with without_company=true); suggested_company_id names the likely one. Its recipient becomes the party the invoice names, as its import read it, found or made in that company, or the company itself when it names none. The invoice then arrives in the company like a new invoice: approval rules give it approvers, and its coding and checks start. A reminder or collection notice instead starts recovering the originals it chases. Choosing the company it already has changes nothing. 409 when it already belongs to another company, when its recipient belongs to another company, or when the company already has the same invoice. Recorded in the invoice's activity.\",\"url\":\"https://docs.watchdog.no/api-reference/endpoints/invoices/choose-an-invoices-company\",\"mainEntityOfPage\":{\"@id\":\"https://docs.watchdog.no/api-reference/endpoints/invoices/choose-an-invoices-company#webpage\"},\"dateModified\":\"2026-11-18T12:33:59.974Z\",\"publisher\":{\"@id\":\"https://watchdog.no/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.watchdog.no#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Watchdog Help Center\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Watchdog\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/endpoints/invoices/choose-an-invoices-company.md","siteName":"Watchdog Help Center","nav":{"global":{"anchors":[{"anchor":"Watchdog","icon":"house","href":"https://watchdog.no"}]},"languages":[{"language":"en","default":true,"navbar":{"links":[{"href":"mailto:support@watchdog.no","label":"Support"}],"primary":{"type":"button","label":"Open Watchdog","href":"https://app.watchdog.no"}},"tabs":[{"tab":"User guides","icon":"book-open","pages":[{"title":"User guides","href":""}]},{"tab":"API","icon":"code","groups":[{"group":"Start here","pages":[{"title":"Watchdog API","icon":"code","tag":"Beta","href":"/api-reference/introduction"},{"title":"Quickstart","icon":"terminal","href":"/api-reference/quickstart"},{"title":"Authentication and API keys","icon":"key","href":"/api-reference/authentication"},{"title":"Upload invoices","icon":"file-arrow-up","href":"/api-reference/upload-invoices"},{"title":"API conventions","icon":"key","href":"/api-reference/conventions"},{"title":"Views","icon":"filter","href":"/api-reference/views"},{"title":"Teams","icon":"users","href":"/api-reference/teams"},{"title":"Changelog","icon":"bullhorn","href":"/api-reference/changelog"}]},{"group":"Understand your data","pages":[{"title":"Overview and search","href":"/api-reference/overview-search"},{"title":"Invoices","icon":"file-invoice","href":"/api-reference/invoices"},{"title":"Alerts","icon":"bell","href":"/api-reference/alerts"},{"title":"Claims","icon":"hand-holding-dollar","href":"/api-reference/claims"},{"title":"Agreements","icon":"file-contract","href":"/api-reference/agreements"},{"title":"Matching","icon":"link","href":"/api-reference/matching"},{"title":"Compliance checks","icon":"shield-check","href":"/api-reference/compliance-checks"},{"title":"Integrations and syncs","icon":"plug","href":"/api-reference/integrations"},{"title":"Workflow runs","icon":"list-check","href":"/api-reference/workflow-runs"},{"title":"Activity and comments","href":"/api-reference/activity"}]},{"group":"Endpoints","pages":[{"group":"Home and search","pages":[{"title":"Get the organization overview","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/overview","href":"/api-reference/endpoints/overview/get-the-organization-overview"},{"title":"Get the AP flow statistics","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/overview/ap-flow","href":"/api-reference/endpoints/overview/get-the-ap-flow-statistics"},{"title":"Find agreements, invoices, alerts, topics and claims by name","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/search","href":"/api-reference/endpoints/search/find-agreements-invoices-alerts-topics-and-claims-by-name"}]},{"group":"Identity","pages":[{"title":"Get the current user","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/me","href":"/api-reference/endpoints/identity/get-the-current-user"}]},{"group":"Organizations","pages":[{"title":"List your organizations","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/organizations","href":"/api-reference/endpoints/organizations/list-your-organizations"},{"title":"Get an organization","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/organization","href":"/api-reference/endpoints/organizations/get-an-organization"},{"title":"Set the organization logo","deprecated":null,"version":null,"openapi":"/openapi.json put /v1/organization/logo","href":"/api-reference/endpoints/organizations/set-the-organization-logo"},{"title":"Update an organization","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/organization","href":"/api-reference/endpoints/organizations/update-an-organization"}]},{"group":"Companies","pages":[{"title":"List companies","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/companies","href":"/api-reference/endpoints/companies/list-companies"},{"title":"Create a company","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/companies","href":"/api-reference/endpoints/companies/create-a-company"},{"title":"Get a company","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/companies/{id}","href":"/api-reference/endpoints/companies/get-a-company"},{"title":"Update a company","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/companies/{id}","href":"/api-reference/endpoints/companies/update-a-company"},{"title":"Generate a description of a company","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/companies/{id}/description/generate","href":"/api-reference/endpoints/companies/generate-a-description-of-a-company"},{"title":"Preview archiving a company","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/companies/{id}/archive/preview","href":"/api-reference/endpoints/companies/preview-archiving-a-company"},{"title":"Archive a company","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/companies/{id}/archive","href":"/api-reference/endpoints/companies/archive-a-company"},{"title":"Unarchive a company","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/companies/{id}/unarchive","href":"/api-reference/endpoints/companies/unarchive-a-company"},{"title":"Preview exporting a company","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/companies/{id}/export/preview","href":"/api-reference/endpoints/companies/preview-exporting-a-company"},{"title":"Export a company's data","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/companies/{id}/export","href":"/api-reference/endpoints/companies/export-a-companys-data"},{"title":"Preview erasing a company","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/companies/{id}/erasure/preview","href":"/api-reference/endpoints/companies/preview-erasing-a-company"},{"title":"Request erasure of a company","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/companies/{id}/erasure","href":"/api-reference/endpoints/companies/request-erasure-of-a-company"},{"title":"Cancel a company's erasure","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/companies/{id}/erasure","href":"/api-reference/endpoints/companies/cancel-a-companys-erasure"},{"title":"Get how a company receives invoices","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/companies/{id}/reception","href":"/api-reference/endpoints/companies/get-how-a-company-receives-invoices"},{"title":"Give a company its own invoice address","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/companies/{id}/email-address","href":"/api-reference/endpoints/companies/give-a-company-its-own-invoice-address"},{"title":"List a company's delivery addresses","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/companies/{id}/delivery-addresses","href":"/api-reference/endpoints/companies/list-a-companys-delivery-addresses"},{"title":"Add a delivery address to a company","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/companies/{id}/delivery-addresses","href":"/api-reference/endpoints/companies/add-a-delivery-address-to-a-company"},{"title":"Change a company's delivery address","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/companies/{id}/delivery-addresses/{address_id}","href":"/api-reference/endpoints/companies/change-a-companys-delivery-address"},{"title":"List the countries with a company register","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/companies/register/countries","href":"/api-reference/endpoints/companies/list-the-countries-with-a-company-register"},{"title":"Search a country's company register","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/companies/register/search","href":"/api-reference/endpoints/companies/search-a-countrys-company-register"},{"title":"Preview a company's legal identity","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/companies/register/preview","href":"/api-reference/endpoints/companies/preview-a-companys-legal-identity"}]},{"group":"Members","pages":[{"title":"List who has access: organization members and roles","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/members","href":"/api-reference/endpoints/members/list-who-has-access:-organization-members-and-roles"},{"title":"Get an organization member","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/members/{user_id}","href":"/api-reference/endpoints/members/get-an-organization-member"},{"title":"Update a member","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/members/{user_id}","href":"/api-reference/endpoints/members/update-a-member"},{"title":"Remove an organization member","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/members/{user_id}","href":"/api-reference/endpoints/members/remove-an-organization-member"}]},{"group":"Invitations","pages":[{"title":"List organization invitations","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invitations","href":"/api-reference/endpoints/invitations/list-organization-invitations"},{"title":"Get an organization invitation","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invitations/{id}","href":"/api-reference/endpoints/invitations/get-an-organization-invitation"},{"title":"Invite organization members","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invitations","href":"/api-reference/endpoints/invitations/invite-organization-members"},{"title":"Revoke an organization invitation","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/invitations/{id}","href":"/api-reference/endpoints/invitations/revoke-an-organization-invitation"}]},{"group":"Notifications","pages":[{"title":"Read notification preferences","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/notifications/preferences","href":"/api-reference/endpoints/notifications/read-notification-preferences"},{"title":"Update notification preferences","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/notifications/preferences","href":"/api-reference/endpoints/notifications/update-notification-preferences"},{"title":"Follow a View","deprecated":null,"version":null,"openapi":"/openapi.json put /v1/notifications/followed-views/{view_id}","href":"/api-reference/endpoints/notifications/follow-a-view"},{"title":"Unfollow a View","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/notifications/followed-views/{view_id}","href":"/api-reference/endpoints/notifications/unfollow-a-view"},{"title":"List notification channels","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/notifications/channels","href":"/api-reference/endpoints/notifications/list-notification-channels"},{"title":"Create a notification channel","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/notifications/channels","href":"/api-reference/endpoints/notifications/create-a-notification-channel"},{"title":"Read a notification channel","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/notifications/channels/{id}","href":"/api-reference/endpoints/notifications/read-a-notification-channel"},{"title":"Disconnect a notification channel","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/notifications/channels/{id}","href":"/api-reference/endpoints/notifications/disconnect-a-notification-channel"}]},{"group":"Views","pages":[{"title":"List shared Views","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/views","href":"/api-reference/endpoints/views/list-shared-views"},{"title":"Get a shared View","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/views/{id}","href":"/api-reference/endpoints/views/get-a-shared-view"},{"title":"Create a shared View","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/views","href":"/api-reference/endpoints/views/create-a-shared-view"},{"title":"Update a shared View","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/views/{id}","href":"/api-reference/endpoints/views/update-a-shared-view"},{"title":"Delete a shared View","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/views/{id}","href":"/api-reference/endpoints/views/delete-a-shared-view"}]},{"group":"Teams","pages":[{"title":"List teams","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/teams","href":"/api-reference/endpoints/teams/list-teams"},{"title":"Get a team","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/teams/{id}","href":"/api-reference/endpoints/teams/get-a-team"},{"title":"Create a team","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/teams","href":"/api-reference/endpoints/teams/create-a-team"},{"title":"Update a team","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/teams/{id}","href":"/api-reference/endpoints/teams/update-a-team"},{"title":"Delete a team","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/teams/{id}","href":"/api-reference/endpoints/teams/delete-a-team"}]},{"group":"Approval rules","pages":[{"title":"List approval rules","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/approval-rules","href":"/api-reference/endpoints/approval-rules/list-approval-rules"},{"title":"Get an approval rule","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/approval-rules/{id}","href":"/api-reference/endpoints/approval-rules/get-an-approval-rule"},{"title":"Create an approval rule","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/approval-rules","href":"/api-reference/endpoints/approval-rules/create-an-approval-rule"},{"title":"Update an approval rule","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/approval-rules/{id}","href":"/api-reference/endpoints/approval-rules/update-an-approval-rule"},{"title":"Delete an approval rule","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/approval-rules/{id}","href":"/api-reference/endpoints/approval-rules/delete-an-approval-rule"},{"title":"Order approval rules","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/approval-rules/order","href":"/api-reference/endpoints/approval-rules/order-approval-rules"}]},{"group":"Approval policy","pages":[{"title":"Get the approval policy","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/approval-policy","href":"/api-reference/endpoints/approval-policy/get-the-approval-policy"},{"title":"Update the approval policy","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/approval-policy","href":"/api-reference/endpoints/approval-policy/update-the-approval-policy"}]},{"group":"Usage","pages":[{"title":"List usage by billing period","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/usage","href":"/api-reference/endpoints/usage/list-usage-by-billing-period"},{"title":"Get usage policy","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/usage/policy","href":"/api-reference/endpoints/usage/get-usage-policy"},{"title":"List usage policy revisions","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/usage/policy/revisions","href":"/api-reference/endpoints/usage/list-usage-policy-revisions"},{"title":"Update usage overage policy","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/usage/policy","href":"/api-reference/endpoints/usage/update-usage-overage-policy"}]},{"group":"Agreements","pages":[{"title":"List agreements","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/agreements","href":"/api-reference/endpoints/agreements/list-agreements"},{"title":"Count agreements by status","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/agreements/counts","href":"/api-reference/endpoints/agreements/count-agreements-by-status"},{"title":"Get an agreement","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/agreements/{id}","href":"/api-reference/endpoints/agreements/get-an-agreement"},{"title":"List suggested instruction edits","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/agreements/{id}/context-suggestions","href":"/api-reference/endpoints/agreements/list-suggested-instruction-edits"},{"title":"List the Views that include an agreement","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/agreements/{id}/views","href":"/api-reference/endpoints/agreements/list-the-views-that-include-an-agreement"},{"title":"Create an agreement","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/agreements","href":"/api-reference/endpoints/agreements/create-an-agreement"},{"title":"Suggest agreement details","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/agreements/{id}/suggest-details","href":"/api-reference/endpoints/agreements/suggest-agreement-details"},{"title":"Refresh an agreement's invoice matching","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/matching/refresh","href":"/api-reference/endpoints/agreements/refresh-an-agreements-invoice-matching"},{"title":"Find matching purchase orders","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/agreements/{id}/purchase-order-matching","href":"/api-reference/endpoints/agreements/find-matching-purchase-orders"},{"title":"List excluded invoices","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/agreements/{id}/invoice-exclusions","href":"/api-reference/endpoints/agreements/list-excluded-invoices"},{"title":"Exclude invoices from an agreement","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/agreements/{id}/invoice-exclusions","href":"/api-reference/endpoints/agreements/exclude-invoices-from-an-agreement"},{"title":"Restore excluded invoices","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/agreements/{id}/invoice-exclusions/delete","href":"/api-reference/endpoints/agreements/restore-excluded-invoices"},{"title":"Accept a suggested instruction edit","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/agreements/{id}/context-suggestions/{suggestion_id}/accept","href":"/api-reference/endpoints/agreements/accept-a-suggested-instruction-edit"},{"title":"Reject a suggested instruction edit","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/agreements/{id}/context-suggestions/{suggestion_id}/reject","href":"/api-reference/endpoints/agreements/reject-a-suggested-instruction-edit"},{"title":"Teach the agreement a rule from alerts (don't flag this again)","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/agreements/{id}/teach","href":"/api-reference/endpoints/agreements/teach-the-agreement-a-rule-from-alerts-dont-flag-this-again"},{"title":"Edit an agreement","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/agreements/{id}","href":"/api-reference/endpoints/agreements/edit-an-agreement"},{"title":"Preview deleting an agreement","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/agreements/{id}/delete/preview","href":"/api-reference/endpoints/agreements/preview-deleting-an-agreement"},{"title":"Delete an agreement","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/agreements/{id}","href":"/api-reference/endpoints/agreements/delete-an-agreement"},{"group":"Tags","pages":[{"title":"List agreement tags","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/agreements/tags","href":"/api-reference/endpoints/agreement-tags/list-agreement-tags"},{"title":"Create an agreement tag","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/agreements/tags","href":"/api-reference/endpoints/agreement-tags/create-an-agreement-tag"},{"title":"Rename an agreement tag","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/agreements/tags/{id}","href":"/api-reference/endpoints/agreement-tags/rename-an-agreement-tag"},{"title":"Preview deleting an agreement tag","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/agreements/tags/{id}/delete/preview","href":"/api-reference/endpoints/agreement-tags/preview-deleting-an-agreement-tag"},{"title":"Delete an agreement tag","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/agreements/tags/{id}","href":"/api-reference/endpoints/agreement-tags/delete-an-agreement-tag"}]},{"group":"Prices","pages":[{"title":"List the agreed prices of an agreement","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/agreements/{id}/price-items","href":"/api-reference/endpoints/agreement-prices/list-the-agreed-prices-of-an-agreement"},{"title":"Export agreement prices as CSV","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/agreements/{id}/price-items/export","href":"/api-reference/endpoints/agreement-prices/export-agreement-prices-as-csv"},{"title":"Add agreement prices","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/agreements/{id}/price-items","href":"/api-reference/endpoints/agreement-prices/add-agreement-prices"},{"title":"Edit agreement prices","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/agreements/{id}/price-items","href":"/api-reference/endpoints/agreement-prices/edit-agreement-prices"},{"title":"Remove matching agreement prices","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/agreements/{id}/price-items/delete","href":"/api-reference/endpoints/agreement-prices/remove-matching-agreement-prices"}]},{"group":"Documents","pages":[{"title":"List agreement documents","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/agreements/{id}/documents","href":"/api-reference/endpoints/agreement-documents/list-agreement-documents"},{"title":"Import documents to an agreement","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/agreements/{id}/document-imports","href":"/api-reference/endpoints/agreement-documents/import-documents-to-an-agreement"},{"title":"Edit document role or position","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/agreements/{id}/documents/{document_id}","href":"/api-reference/endpoints/agreement-documents/edit-document-role-or-position"},{"title":"Unlink an agreement document","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/agreements/{id}/documents/{document_id}","href":"/api-reference/endpoints/agreement-documents/unlink-an-agreement-document"}]},{"group":"Price imports","pages":[{"title":"List price imports","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/agreements/{id}/price-imports","href":"/api-reference/endpoints/agreement-price-imports/list-price-imports"},{"title":"Get a price import","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/agreements/{id}/price-imports/{import_id}","href":"/api-reference/endpoints/agreement-price-imports/get-a-price-import"},{"title":"Get a link to download the rows a price import extracted","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/agreements/{id}/price-imports/{import_id}/download","href":"/api-reference/endpoints/agreement-price-imports/get-a-link-to-download-the-rows-a-price-import-extracted"},{"title":"Import prices from documents","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/agreements/{id}/price-imports","href":"/api-reference/endpoints/agreement-price-imports/import-prices-from-documents"}]}]},{"group":"Alerts","pages":[{"title":"List alerts","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/alerts","href":"/api-reference/endpoints/alerts/list-alerts"},{"title":"Total alert amounts, overall or per supplier, agreement, topic or month","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/alerts/metrics","href":"/api-reference/endpoints/alerts/total-alert-amounts-overall-or-per-supplier-agreement-topic-or-month"},{"title":"Get an alert","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/alerts/{id}","href":"/api-reference/endpoints/alerts/get-an-alert"},{"title":"List alert topics","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/alert-topics","href":"/api-reference/endpoints/alerts/list-alert-topics"},{"title":"Get an alert topic","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/alert-topics/{id}","href":"/api-reference/endpoints/alerts/get-an-alert-topic"},{"title":"Export selected alerts","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/alerts/export","href":"/api-reference/endpoints/alerts/export-selected-alerts"},{"title":"Get a topic proposal","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/alert-topic-proposals/{id}","href":"/api-reference/endpoints/alerts/get-a-topic-proposal"},{"title":"Create an alert","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/alerts","href":"/api-reference/endpoints/alerts/create-an-alert"},{"title":"Create an alert topic","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/alert-topics","href":"/api-reference/endpoints/alerts/create-an-alert-topic"},{"title":"Update alerts: confirm, mark as false alarm, skip, move back to review, add to or remove from a claim, move to another topic","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/alerts/update","href":"/api-reference/endpoints/alerts/update-alerts:-confirm-mark-as-false-alarm-skip-move-back-to-review-add-to-or-remove-from-a-claim-move-to-another-topic"},{"title":"Delete selected alerts","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/alerts/delete","href":"/api-reference/endpoints/alerts/delete-selected-alerts"},{"title":"Categorize an agreement's alerts","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/agreements/{id}/alert-topics/reconcile","href":"/api-reference/endpoints/alerts/categorize-an-agreements-alerts"},{"title":"Propose a topic merge or split","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/alert-topic-proposals","href":"/api-reference/endpoints/alerts/propose-a-topic-merge-or-split"},{"title":"Apply a topic proposal","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/alert-topic-proposals/{id}/apply","href":"/api-reference/endpoints/alerts/apply-a-topic-proposal"},{"title":"Update an alert: edit, confirm, mark as false alarm, skip, move back to review, add to a claim, move to another topic","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/alerts/{id}","href":"/api-reference/endpoints/alerts/update-an-alert:-edit-confirm-mark-as-false-alarm-skip-move-back-to-review-add-to-a-claim-move-to-another-topic"},{"title":"Edit an alert topic","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/alert-topics/{id}","href":"/api-reference/endpoints/alerts/edit-an-alert-topic"},{"title":"Delete an alert topic","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/alert-topics/{id}","href":"/api-reference/endpoints/alerts/delete-an-alert-topic"}]},{"group":"Claims","pages":[{"title":"List claims","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/claims","href":"/api-reference/endpoints/claims/list-claims"},{"title":"Get claim and recovery totals","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/claims/metrics","href":"/api-reference/endpoints/claims/get-claim-and-recovery-totals"},{"title":"Get a claim","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/claims/{id}","href":"/api-reference/endpoints/claims/get-a-claim"},{"title":"List claim recoveries","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/claims/{id}/recoveries","href":"/api-reference/endpoints/claims/list-claim-recoveries"},{"title":"List credit notes that may answer a claim","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/claims/{id}/credit-note-suggestions","href":"/api-reference/endpoints/claims/list-credit-notes-that-may-answer-a-claim"},{"title":"Export a claim","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/claims/{id}/export","href":"/api-reference/endpoints/claims/export-a-claim"},{"title":"List claim invoice documents","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/claims/{id}/documents","href":"/api-reference/endpoints/claims/list-claim-invoice-documents"},{"title":"Create a claim","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/claims","href":"/api-reference/endpoints/claims/create-a-claim"},{"title":"Preview adding alerts to a claim","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/claims/alerts/preview","href":"/api-reference/endpoints/claims/preview-adding-alerts-to-a-claim"},{"title":"Delete a claim","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/claims/{id}","href":"/api-reference/endpoints/claims/delete-a-claim"},{"title":"Record a claim recovery","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/claims/{id}/recoveries","href":"/api-reference/endpoints/claims/record-a-claim-recovery"},{"title":"Update a claim","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/claims/{id}","href":"/api-reference/endpoints/claims/update-a-claim"},{"title":"Update a recovery","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/recoveries/{id}","href":"/api-reference/endpoints/claims/update-a-recovery"},{"title":"Delete a recovery","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/recoveries/{id}","href":"/api-reference/endpoints/claims/delete-a-recovery"}]},{"group":"Compliance checks","pages":[{"title":"List compliance checks","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/compliance-checks","href":"/api-reference/endpoints/compliance-checks/list-compliance-checks"},{"title":"Get a compliance check","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/compliance-checks/{id}","href":"/api-reference/endpoints/compliance-checks/get-a-compliance-check"},{"title":"List compliance check findings","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/compliance-checks/{id}/findings","href":"/api-reference/endpoints/compliance-checks/list-compliance-check-findings"},{"title":"Get a compliance check transcript","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/compliance-checks/{id}/transcript","href":"/api-reference/endpoints/compliance-checks/get-a-compliance-check-transcript"},{"title":"Start compliance checks","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/checks","href":"/api-reference/endpoints/compliance-checks/start-compliance-checks"},{"title":"Reset compliance checks","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/checks/reset","href":"/api-reference/endpoints/compliance-checks/reset-compliance-checks"}]},{"group":"Documents","pages":[{"title":"List documents","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/documents","href":"/api-reference/endpoints/documents/list-documents"},{"title":"Get document metadata","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/documents/{id}","href":"/api-reference/endpoints/documents/get-document-metadata"},{"title":"Get a link to download a document","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/documents/{id}/download","href":"/api-reference/endpoints/documents/get-a-link-to-download-a-document"},{"title":"Read the text of a document or agreement contract","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/documents/{id}/text","href":"/api-reference/endpoints/documents/read-the-text-of-a-document-or-agreement-contract"},{"title":"Download selected documents as a ZIP archive","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/documents/download-archive","href":"/api-reference/endpoints/documents/download-selected-documents-as-a-zip-archive"},{"title":"Get a link to upload a document","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/documents/upload","href":"/api-reference/endpoints/documents/get-a-link-to-upload-a-document"},{"title":"Upload a document","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/documents/upload/direct","href":"/api-reference/endpoints/documents/upload-a-document"},{"title":"Extract document text","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/documents/{id}/extract","href":"/api-reference/endpoints/documents/extract-document-text"},{"title":"Index an agreement document","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/documents/{id}/index","href":"/api-reference/endpoints/documents/index-an-agreement-document"},{"title":"Search what the agreement text says about a subject","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/documents/search","href":"/api-reference/endpoints/documents/search-what-the-agreement-text-says-about-a-subject"},{"title":"Delete unused documents","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/documents/delete","href":"/api-reference/endpoints/documents/delete-unused-documents"}]},{"group":"Invoice imports","pages":[{"title":"List invoice imports","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/imports","href":"/api-reference/endpoints/invoice-imports/list-invoice-imports"},{"title":"Get an invoice import","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/imports/{id}","href":"/api-reference/endpoints/invoice-imports/get-an-invoice-import"},{"title":"Import an invoice from documents","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/imports","href":"/api-reference/endpoints/invoice-imports/import-an-invoice-from-documents"},{"title":"Import as an invoice","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/imports/{id}/import-as-invoice","href":"/api-reference/endpoints/invoice-imports/import-as-an-invoice"},{"title":"Choose the supplier of an import","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/imports/{id}/letter-creditor","href":"/api-reference/endpoints/invoice-imports/choose-the-supplier-of-an-import"},{"title":"Remove selected imports from history","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/imports/delete","href":"/api-reference/endpoints/invoice-imports/remove-selected-imports-from-history"},{"title":"List what was received and needs attention","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/intake/needs-attention","href":"/api-reference/endpoints/invoice-imports/list-what-was-received-and-needs-attention"},{"title":"Mark needs-attention items as handled","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/intake/needs-attention/handle","href":"/api-reference/endpoints/invoice-imports/mark-needs-attention-items-as-handled"},{"title":"Reopen handled needs-attention items","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/intake/needs-attention/reopen","href":"/api-reference/endpoints/invoice-imports/reopen-handled-needs-attention-items"},{"title":"Report needs-attention items to Watchdog support","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/intake/needs-attention/report","href":"/api-reference/endpoints/invoice-imports/report-needs-attention-items-to-watchdog-support"},{"title":"List received invoice emails","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/intake/emails","href":"/api-reference/endpoints/invoice-imports/list-received-invoice-emails"}]},{"group":"Invoices","pages":[{"title":"Total invoice spend, overall or per supplier, recipient or month","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/metrics","href":"/api-reference/endpoints/invoices/total-invoice-spend-overall-or-per-supplier-recipient-or-month"},{"title":"Count active invoices in each lifecycle phase and status","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/lifecycle-counts","href":"/api-reference/endpoints/invoices/count-active-invoices-in-each-lifecycle-phase-and-status"},{"title":"Find what was paid for a product across invoices","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/line-items","href":"/api-reference/endpoints/invoices/find-what-was-paid-for-a-product-across-invoices"},{"title":"Export selected invoices as CSV","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/export","href":"/api-reference/endpoints/invoices/export-selected-invoices-as-csv"},{"title":"List the columns of the invoice export","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/export/columns","href":"/api-reference/endpoints/invoices/list-the-columns-of-the-invoice-export"},{"title":"Find invoices by supplier, number, date or status","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices","href":"/api-reference/endpoints/invoices/find-invoices-by-supplier-number-date-or-status"},{"title":"Get an invoice","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/{id}","href":"/api-reference/endpoints/invoices/get-an-invoice"},{"title":"Get an invoice's checks","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/{id}/checks","href":"/api-reference/endpoints/invoices/get-an-invoices-checks"},{"title":"List invoice line items","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/{id}/line-items","href":"/api-reference/endpoints/invoices/list-invoice-line-items"},{"title":"List linked invoices of every category","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/{id}/matched-invoices","href":"/api-reference/endpoints/invoices/list-linked-invoices-of-every-category"},{"title":"List invoice documents","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/{id}/documents","href":"/api-reference/endpoints/invoices/list-invoice-documents"},{"title":"Get an invoice as a PDF","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/{id}/pdf","href":"/api-reference/endpoints/invoices/get-an-invoice-as-a-pdf"},{"title":"List matched agreements","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/{id}/agreements","href":"/api-reference/endpoints/invoices/list-matched-agreements"},{"title":"Get invoice coding","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/{id}/coding","href":"/api-reference/endpoints/invoices/get-invoice-coding"},{"title":"List invoice reminders","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/{id}/reminders","href":"/api-reference/endpoints/invoices/list-invoice-reminders"},{"title":"Link or unlink a letter claim and its original invoice","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{id}/letter-claims/{claim_id}/link","href":"/api-reference/endpoints/invoices/link-or-unlink-a-letter-claim-and-its-original-invoice"},{"title":"Import an original included in a letter PDF","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{id}/letter-claims/{claim_id}/import-original","href":"/api-reference/endpoints/invoices/import-an-original-included-in-a-letter-pdf"},{"title":"Find a letter original in Tripletex","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{id}/letter-claims/{claim_id}/lookup-original","href":"/api-reference/endpoints/invoices/find-a-letter-original-in-tripletex"},{"title":"Preview rereading an invoice or letter","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{id}/classification/preview","href":"/api-reference/endpoints/invoices/preview-rereading-an-invoice-or-letter"},{"title":"Reread an invoice or letter with a corrected interpretation","description":"Admits a reread of the current source documents as an invoice or a reminder. A successful extraction atomically replaces the same record; no second invoice is created. The current record is unchanged if extraction fails, another duplicate is found, or its revision, sources, access or financial dependencies change. Read the returned import for progress. A previously processed record uses no additional processing capacity. An optional Idempotency-Key returns the same import on replay.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{id}/classification","href":"/api-reference/endpoints/invoices/reread-an-invoice-or-letter-with-a-corrected-interpretation"},{"title":"Choose an invoice's company","deprecated":null,"version":null,"openapi":"/openapi.json put /v1/invoices/{id}/company","href":"/api-reference/endpoints/invoices/choose-an-invoices-company"},{"title":"Get invoice readiness","description":"What to know before approving: whether the invoice can be sent to the accounting system once approved, by the rules transferInvoice applies (asking the accounting system about the supplier and company), whether its sender and buyer match how it arrived, and whether its organization number and bank account match the accounting system's supplier card.","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/{id}/readiness","href":"/api-reference/endpoints/invoices/get-invoice-readiness"},{"title":"Create an invoice from structured data","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices","href":"/api-reference/endpoints/invoices/create-an-invoice-from-structured-data"},{"title":"Restore an invoice","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{id}/restore","href":"/api-reference/endpoints/invoices/restore-an-invoice"},{"title":"Send an invoice to the accounting system","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{id}/transfer","href":"/api-reference/endpoints/invoices/send-an-invoice-to-the-accounting-system"},{"title":"Book a sent invoice in the accounting system","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{id}/book","href":"/api-reference/endpoints/invoices/book-a-sent-invoice-in-the-accounting-system"},{"title":"Add or remove invoice approvers","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/update-approvers","href":"/api-reference/endpoints/invoices/add-or-remove-invoice-approvers"},{"title":"Set an invoice's approval steps","deprecated":null,"version":null,"openapi":"/openapi.json put /v1/invoices/{id}/approval-steps","href":"/api-reference/endpoints/invoices/set-an-invoices-approval-steps"},{"title":"Preview who cannot see invoices before assigning approvers","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/approver-visibility","href":"/api-reference/endpoints/invoices/preview-who-cannot-see-invoices-before-assigning-approvers"},{"title":"Add a matched invoice","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{id}/matched-invoices","href":"/api-reference/endpoints/invoices/add-a-matched-invoice"},{"title":"Refresh an invoice","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{id}/refresh","href":"/api-reference/endpoints/invoices/refresh-an-invoice"},{"title":"Attach a document to an invoice","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{id}/documents","href":"/api-reference/endpoints/invoices/attach-a-document-to-an-invoice"},{"title":"Suggest invoice coding","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{id}/coding/suggest","href":"/api-reference/endpoints/invoices/suggest-invoice-coding"},{"title":"Clear invoice coding","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{id}/coding/clear","href":"/api-reference/endpoints/invoices/clear-invoice-coding"},{"title":"Make a document the primary invoice document","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/invoices/{id}/documents/{document_id}","href":"/api-reference/endpoints/invoices/make-a-document-the-primary-invoice-document"},{"title":"Update an invoice, or send, approve, hold, close or mark it paid","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/invoices/{id}","href":"/api-reference/endpoints/invoices/update-an-invoice-or-send-approve-hold-close-or-mark-it-paid"},{"title":"Code invoice lines","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/invoices/{id}/coding","href":"/api-reference/endpoints/invoices/code-invoice-lines"},{"title":"Soft-delete an invoice","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/invoices/{id}","href":"/api-reference/endpoints/invoices/soft-delete-an-invoice"},{"title":"Remove a matched invoice","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/invoices/{id}/matched-invoices/{match_id}","href":"/api-reference/endpoints/invoices/remove-a-matched-invoice"},{"title":"Unlink an invoice document","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/invoices/{id}/documents/{document_id}","href":"/api-reference/endpoints/invoices/unlink-an-invoice-document"}]},{"group":"Purchase orders","pages":[{"title":"List purchase orders","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/purchase-orders","href":"/api-reference/endpoints/purchase-orders/list-purchase-orders"},{"title":"Count purchase orders","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/purchase-orders/metrics","href":"/api-reference/endpoints/purchase-orders/count-purchase-orders"},{"title":"Count purchase orders without totals","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/purchase-orders/counts","href":"/api-reference/endpoints/purchase-orders/count-purchase-orders-without-totals"},{"title":"Get a purchase order","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/purchase-orders/{id}","href":"/api-reference/endpoints/purchase-orders/get-a-purchase-order"},{"title":"List purchase order revisions","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/purchase-orders/{id}/revisions","href":"/api-reference/endpoints/purchase-orders/list-purchase-order-revisions"},{"title":"Check a purchase order against its agreement","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/purchase-orders/{id}/agreement-check","href":"/api-reference/endpoints/purchase-orders/check-a-purchase-order-against-its-agreement"},{"title":"List an agreement's prices as purchase order lines","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/purchase-orders/agreement-prices","href":"/api-reference/endpoints/purchase-orders/list-an-agreements-prices-as-purchase-order-lines"},{"title":"Export a purchase order","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/purchase-orders/{id}/export","href":"/api-reference/endpoints/purchase-orders/export-a-purchase-order"},{"title":"Create a purchase order","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/purchase-orders","href":"/api-reference/endpoints/purchase-orders/create-a-purchase-order"},{"title":"Preview a purchase order","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/purchase-orders/preview","href":"/api-reference/endpoints/purchase-orders/preview-a-purchase-order"},{"title":"Preview a purchase order's references","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/purchase-orders/preview/references","href":"/api-reference/endpoints/purchase-orders/preview-a-purchase-orders-references"},{"title":"Update a purchase order","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/purchase-orders/{id}","href":"/api-reference/endpoints/purchase-orders/update-a-purchase-order"},{"title":"Add or remove purchase order approvers","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/purchase-orders/{id}/update-approvers","href":"/api-reference/endpoints/purchase-orders/add-or-remove-purchase-order-approvers"},{"title":"Record goods received","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/purchase-orders/{id}/receipts","href":"/api-reference/endpoints/purchase-orders/record-goods-received"},{"title":"Push a purchase order to an accounting system","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/purchase-orders/{id}/pushes","href":"/api-reference/endpoints/purchase-orders/push-a-purchase-order-to-an-accounting-system"},{"title":"Delete a draft purchase order","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/purchase-orders/{id}","href":"/api-reference/endpoints/purchase-orders/delete-a-draft-purchase-order"},{"group":"Documents","pages":[{"title":"List purchase order documents","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/purchase-orders/{id}/documents","href":"/api-reference/endpoints/purchase-order-documents/list-purchase-order-documents"},{"title":"Attach a document to a purchase order","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/purchase-orders/{id}/documents","href":"/api-reference/endpoints/purchase-order-documents/attach-a-document-to-a-purchase-order"},{"title":"Remove a document from a purchase order","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/purchase-orders/{id}/documents/{document_id}","href":"/api-reference/endpoints/purchase-order-documents/remove-a-document-from-a-purchase-order"}]},{"group":"Supplier email","pages":[{"title":"Read purchase order correspondence","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/purchase-orders/{id}/correspondence","href":"/api-reference/endpoints/purchase-orders/read-purchase-order-correspondence"},{"title":"Revoke the purchase order reply address","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/purchase-orders/{id}/reply-address","href":"/api-reference/endpoints/purchase-orders/revoke-the-purchase-order-reply-address"}]},{"group":"Imports","pages":[{"title":"Get a purchase order import","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/purchase-orders/imports/{id}","href":"/api-reference/endpoints/purchase-order-imports/get-a-purchase-order-import"},{"title":"Create a purchase order from documents","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/purchase-orders/imports","href":"/api-reference/endpoints/purchase-order-imports/create-a-purchase-order-from-documents"}]},{"group":"Invoices","pages":[{"title":"List invoices related to a purchase order","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/purchase-orders/{id}/invoices","href":"/api-reference/endpoints/purchase-orders/list-invoices-related-to-a-purchase-order"},{"title":"Reconcile invoices referencing a purchase order","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/purchase-orders/{id}/invoices/refresh","href":"/api-reference/endpoints/purchase-orders/reconcile-invoices-referencing-a-purchase-order"},{"title":"List invoice purchase order decisions","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/{id}/purchase-orders","href":"/api-reference/endpoints/invoices/list-invoice-purchase-order-decisions"},{"title":"Accept a purchase order for an invoice","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{id}/purchase-orders","href":"/api-reference/endpoints/invoices/accept-a-purchase-order-for-an-invoice"},{"title":"Reject or unlink an invoice purchase order","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/invoices/{id}/purchase-orders/{poId}","href":"/api-reference/endpoints/invoices/reject-or-unlink-an-invoice-purchase-order"},{"title":"Reset purchase orders to automatic matching","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{id}/purchase-orders/reset","href":"/api-reference/endpoints/invoices/reset-purchase-orders-to-automatic-matching"},{"title":"List which purchase order each invoice line bills","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/{id}/purchase-orders/allocations","href":"/api-reference/endpoints/invoices/list-which-purchase-order-each-invoice-line-bills"},{"title":"Assign whole invoice lines to purchase orders","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/invoices/{id}/purchase-orders/allocations","href":"/api-reference/endpoints/invoices/assign-whole-invoice-lines-to-purchase-orders"}]}]},{"group":"Suppliers and recipients","pages":[{"title":"List suppliers or recipients","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/parties","href":"/api-reference/endpoints/suppliers-and-recipients/list-suppliers-or-recipients"},{"title":"Get a supplier or recipient","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/parties/{id}","href":"/api-reference/endpoints/suppliers-and-recipients/get-a-supplier-or-recipient"},{"title":"Create a supplier or recipient","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/parties","href":"/api-reference/endpoints/suppliers-and-recipients/create-a-supplier-or-recipient"},{"title":"Find a supplier or recipient by organization or VAT number","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/parties/match","href":"/api-reference/endpoints/suppliers-and-recipients/find-a-supplier-or-recipient-by-organization-or-vat-number"},{"title":"Update a supplier or recipient","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/parties/{id}","href":"/api-reference/endpoints/suppliers-and-recipients/update-a-supplier-or-recipient"},{"title":"List likely duplicate suppliers or recipients","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/parties/duplicates","href":"/api-reference/endpoints/suppliers-and-recipients/list-likely-duplicate-suppliers-or-recipients"},{"title":"Export suppliers or recipients","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/parties/export","href":"/api-reference/endpoints/suppliers-and-recipients/export-suppliers-or-recipients"},{"title":"Merge suppliers or recipients","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/parties/{id}/merge","href":"/api-reference/endpoints/suppliers-and-recipients/merge-suppliers-or-recipients"},{"title":"Delete unused suppliers or recipients","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/parties/delete","href":"/api-reference/endpoints/suppliers-and-recipients/delete-unused-suppliers-or-recipients"},{"title":"List the accounting system's suppliers","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/parties/erp-suppliers","href":"/api-reference/endpoints/suppliers-and-recipients/list-the-accounting-systems-suppliers"},{"title":"List a supplier's links to the accounting system","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/parties/{id}/erp-links","href":"/api-reference/endpoints/suppliers-and-recipients/list-a-suppliers-links-to-the-accounting-system"},{"title":"Link a supplier to the accounting system","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/parties/{id}/erp-links","href":"/api-reference/endpoints/suppliers-and-recipients/link-a-supplier-to-the-accounting-system"},{"title":"Create a supplier in the accounting system","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/parties/{id}/erp-links/create","href":"/api-reference/endpoints/suppliers-and-recipients/create-a-supplier-in-the-accounting-system"},{"title":"Unlink a supplier from the accounting system","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/parties/{id}/erp-links/unlink","href":"/api-reference/endpoints/suppliers-and-recipients/unlink-a-supplier-from-the-accounting-system"}]},{"group":"Integrations","pages":[{"title":"List integration providers","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/integration-providers","href":"/api-reference/endpoints/integrations/list-integration-providers"},{"title":"List accounting integrations and their health","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/integrations","href":"/api-reference/endpoints/integrations/list-accounting-integrations-and-their-health"},{"title":"Create an integration","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/integrations","href":"/api-reference/endpoints/integrations/create-an-integration"},{"title":"Test an integration","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/integrations/test","href":"/api-reference/endpoints/integrations/test-an-integration"},{"title":"List the provider’s ledger accounts","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/integrations/ledger-accounts","href":"/api-reference/endpoints/integrations/list-the-provider’s-ledger-accounts"},{"title":"Retrieve an integration","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/integrations/{id}","href":"/api-reference/endpoints/integrations/retrieve-an-integration"},{"title":"Update an integration","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/integrations/{id}","href":"/api-reference/endpoints/integrations/update-an-integration"},{"title":"Delete an integration","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/integrations/{id}","href":"/api-reference/endpoints/integrations/delete-an-integration"},{"title":"List the provider’s suppliers","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/integrations/{id}/suppliers","href":"/api-reference/endpoints/integrations/list-the-provider’s-suppliers"},{"title":"List the provider’s companies","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/integrations/{id}/companies","href":"/api-reference/endpoints/integrations/list-the-provider’s-companies"},{"title":"List the connection's companies","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/integrations/{id}/company-links","href":"/api-reference/endpoints/integrations/list-the-connections-companies"},{"title":"Link a connection's company","deprecated":null,"version":null,"openapi":"/openapi.json put /v1/integrations/{id}/company-links/{link_id}","href":"/api-reference/endpoints/integrations/link-a-connections-company"},{"title":"Make workspace companies of a connection's companies","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/integrations/{id}/company-links/create-companies","href":"/api-reference/endpoints/integrations/make-workspace-companies-of-a-connections-companies"},{"title":"Start a sync","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/integrations/{id}/syncs","href":"/api-reference/endpoints/integrations/start-a-sync"},{"title":"List syncs","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/integrations/{id}/syncs","href":"/api-reference/endpoints/integrations/list-syncs"},{"title":"Retrieve a sync","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/integrations/{id}/syncs/{sync_id}","href":"/api-reference/endpoints/integrations/retrieve-a-sync"},{"title":"Check the sign-in sending goes through","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/integrations/{id}/sign-in/check","href":"/api-reference/endpoints/integrations/check-the-sign-in-sending-goes-through"},{"title":"Remove the sign-in sending goes through","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/integrations/{id}/sign-in","href":"/api-reference/endpoints/integrations/remove-the-sign-in-sending-goes-through"},{"title":"List ledger accounts","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/ledger-accounts","href":"/api-reference/endpoints/integrations/list-ledger-accounts"},{"title":"List VAT codes","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/vat-codes","href":"/api-reference/endpoints/integrations/list-vat-codes"},{"title":"List dimensions","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/dimensions","href":"/api-reference/endpoints/integrations/list-dimensions"},{"title":"List dimension values","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/dimension-values","href":"/api-reference/endpoints/integrations/list-dimension-values"},{"title":"List accounting sources","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/accounting-sources","href":"/api-reference/endpoints/integrations/list-accounting-sources"}]},{"group":"Workflow runs","pages":[{"title":"List workflow runs","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/workflow-runs","href":"/api-reference/endpoints/workflow-runs/list-workflow-runs"},{"title":"Get a workflow run","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/workflow-runs/{id}","href":"/api-reference/endpoints/workflow-runs/get-a-workflow-run"},{"title":"List workflow run items","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/workflow-runs/{id}/items","href":"/api-reference/endpoints/workflow-runs/list-workflow-run-items"},{"title":"Cancel one workflow item","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/workflow-runs/{id}/items/{item_id}/cancel","href":"/api-reference/endpoints/workflow-runs/cancel-one-workflow-item"},{"title":"Cancel a workflow run","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/workflow-runs/{id}/cancel","href":"/api-reference/endpoints/workflow-runs/cancel-a-workflow-run"},{"title":"Retry a workflow run","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/workflow-runs/{id}/retry","href":"/api-reference/endpoints/workflow-runs/retry-a-workflow-run"}]},{"group":"Activity and comments","pages":[{"title":"Read an entity activity timeline","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/activity","href":"/api-reference/endpoints/activity/read-an-entity-activity-timeline"},{"title":"Get a comment","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/comments/{id}","href":"/api-reference/endpoints/comments/get-a-comment"},{"title":"List comment replies","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/comments/{id}/replies","href":"/api-reference/endpoints/comments/list-comment-replies"},{"title":"Create a comment or reply","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/comments","href":"/api-reference/endpoints/comments/create-a-comment-or-reply"},{"title":"Edit your comment","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/comments/{id}","href":"/api-reference/endpoints/comments/edit-your-comment"},{"title":"Delete your comment","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/comments/{id}","href":"/api-reference/endpoints/comments/delete-your-comment"}]}]}]}]},{"language":"no","footer":{"links":[{"header":"Watchdog","items":[{"label":"Nettside","href":"https://watchdog.no"},{"label":"Kundestøtte","href":"mailto:support@watchdog.no"}]}]},"navbar":{"links":[{"href":"mailto:support@watchdog.no","label":"Kundestøtte"}],"primary":{"type":"button","label":"Åpne Watchdog","href":"https://app.watchdog.no"}},"pages":[{"title":"no","href":"/no"}]}]},"basePath":"","title":"Choose an invoice's company - Watchdog Help Center","deploymentId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","buildId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-jJHA3WSo.js","utils-DbZn3Mjn.js","cloneDeep-CnBnaSyy.js","_Uint8Array-CMQtTgBR.js","isObject-FP1Yky1u.js","utils-Bl2DvzOJ.js","addUniqueKeysToSchema-BwOLo9p1.js","snippetPresets-BBiPpKa-.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-C0px4Tml.js","isEqual-zAyttAAO.js","usePlaygroundInputsStore-Dell6dGw.js","shallow-0VKqkSqN.js","getApiPlaygroundDisplay-CP_ctPEB.js","CodeSnippet-5L35ic0s.js","CodeSnippets-DOXbNhJw.js","Page-DRLI_2Ue.js","getPastedJson-VhzT9m2P.js","icon-CD8_AtCO.js","MethodPill-DGgOMftG.js","DuplicateIcon-DZ6A_EtN.js","createIcon-DUl4oM5f.js","DynamicMarkdown-BGHukeRM.js","SectionHeading-ChrEUs8u.js","axios-vUo_bRtp.js","Markdown-Dj-na-_-.js","dist-C5gjFYHe.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","katex-YMM-FMeD.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js","AssistantPageLink-DEBW87tT.js"]}