{
"error": {
"code": "validation_error",
"message": "No approver to add or remove, the same person both added and removed, or an added user is not a member with write access who can see the order. Nothing changed.",
"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": "Only removing: the order has no approval waiting. Adding: the order is imported, closed or cancelled.",
"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"
}
}
Purchase orders
Add or remove purchase order approvers
Adds and removes approvers by hand, at any time before a decision. On a draft that waits for nobody, approvers are picked, also while the draft is incomplete: they are asked once the draft is opened (updatePurchaseOrder with status open), and approval.sent stays false until then. On a draft that waits, or an open order whose proposed revision waits, they join that request. Removing the last approver withdraws a waiting request unless an approval rule requires approval. Any one approver decides, with updatePurchaseOrder and approval. Approval rules bind everyone but admins: removing an approver a rule added (other than yourself), or adding yourself to an order a rule already chose approvers for, returns 403; adding colleagues stays open. People removed here are not added back by approval rules until someone adds them again. Adding an approver or removing someone who is not one changes nothing. Added approvers of a waiting request are emailed unless they turned off Orders to approve; picked ones once the draft is opened. Recorded in the order’s activity.
{
"error": {
"code": "validation_error",
"message": "No approver to add or remove, the same person both added and removed, or an added user is not a member with write access who can see the order. Nothing changed.",
"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": "Only removing: the order has no approval waiting. Adding: the order is imported, closed or cancelled.",
"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
add_user_ids
string[]
Members to add as approvers: members with write access who can see the order.
Maximum array length: 20
Required string length: 1 - 255
remove_user_ids
string[]
People to remove as approvers.
Maximum array length: 20
Required string length: 1 - 255
add_team_ids
string<uuid>[]
Teams to add as approvers: each counts as one approver, and any member with write access who can see the order may decide for it. Each needs such a member.
Maximum array length: 20
remove_team_ids
string<uuid>[]
Teams to remove as approvers.
Maximum array length: 20
Response
The purchase order.
company_id
string<uuid>
required
The company that places the order. Its buyer is the company's own recipient, unless an imported order names another.
id
string<uuid>
required
number
string | null
required
title
string | null
required
status
enum<string>
required
closed means closed for invoicing, set by a person; it is not derived from an ERP receipt status. Waiting for approval is not a status: see awaiting_approval.
Available options:
draft,
open,
closed,
cancelled
awaiting_approval
boolean
required
The order has an approval request pending: a draft opens once approved; on an opened order it decides the proposed revision, while the current revision stays in force and can be sent and pushed.
approvers
object[]
required
The people the pending approval request waits for, in the order they were added; empty when none is pending. Teams it waits for are on approval.approver_teams. Who decided an earlier request is on approval.
Show child attributes
archived
boolean
required
supplier
object | null
required
Show child attributes
buyer
object | null
required
A recipient: the legal entity that placed the order.
Show child attributes
owner_user_id
string | null
required
Required string length: 1 - 200
Pattern: ^[A-Za-z0-9_-]+$
agreement
object | null
required
Show child attributes
currency_code
string | null
required
commitment_basis
enum<string>
required
lines: the order commits to its active lines. amount_limit: it commits to amount_limit for the scope in scope_description; its lines are price references.
Available options:
lines,
amount_limit
totals
object
required
Show child attributes
billing
object
required
Show child attributes
revision
integer | null
required
The current commercial revision; null for a draft.
open_alert_count
integer
required
Visible, live alerts from checking the order's invoices against it: neither dismissed, skipped nor credited.
Required range: x >= 0
valid_until
string | null
required
origin
enum<string>
required
Where the order was born and is edited: native in Watchdog, imported in the ERP in source.
Available options:
native,
imported
source
object | null
required
The order's ERP. An imported order's terms, lines and cancellation change there and the next sync brings them in; a native order is pushed there and its copy follows Watchdog.
Show child attributes
from_import
boolean
required
Drafted from documents through createPurchaseOrderImport; import has the details.
created_at
string<date-time>
required
updated_at
string<date-time>
required
lifecycle
object
required
Show child attributes
emails
object
required
Which emails the order may send its supplier, as the send endpoints enforce them. None for an imported or archived order; messages also after it is closed or cancelled.
Show child attributes
status_reason
string | null
required
owner
object | null
required
Show child attributes
invoice_approvers
object
required
Who approves the invoices matched to the order, by step and then in the order they were added; not approval.approvers, who approve the order itself. An invoice that bills the order gets them in their steps once Watchdog has read and checked it, in place of the approval rules' approvers. Set with updatePurchaseOrder invoice_approvers.
Show child attributes
amount_limit
string | null
required
Excluding VAT.
Pattern: ^-?\d+(?:\.\d+)?$
unordered_charges
enum<string>
required
Invoice lines the order's lines don't cover, like freight: flag raises an unordered_charge alert, accept accepts them up to unordered_charges_limit.
Available options:
flag,
accept
unordered_charges_limit
string | null
required
Set only with accept: the most accepted across the order's invoices, excluding VAT; null accepts them all.
Pattern: ^-?\d+(?:\.\d+)?$
scope_description
string | null
required
issued_date
string | null
required
valid_from
string | null
required
delivery_date
string | null
required
When the goods or service are expected. Needed to push the order.
delivery
object | null
required
Where to deliver. Null delivers to the buyer's own address. Changing it on an opened order records a revision.
Show child attributes
buyer_reference
string | null
required
While a draft, empty or still the owner's name, it follows the owner's name. A reference a person writes stays.
sales_order_reference
string | null
required
The supplier's order or confirmation number (Peppol SalesOrderID).
contract_reference
string | null
required
While a draft, empty or still the linked agreement's number, it follows the agreement's number.
project_reference
string | null
required
While a draft, empty or still the code of the order's project (its value of a project dimension), it follows that code.
dimension_values
object[]
required
Where the order's cost is booked, in its company: each line takes these, except where it holds its own value for that dimension, and invoices billing the order take them as coding suggestions. Not part of the terms, so revisions leave it out.
Show child attributes
note_to_supplier
string | null
required
Free text for the supplier, printed on the order (Peppol Order Note).
internal_note
string | null
required
budget
string | null
required
Excluding VAT, internal: what the organization expects to spend. Never printed, sent or pushed.
Pattern: ^-?\d+(?:\.\d+)?$
billing_review
object
required
Visible unresolved billing findings. Single invoice is exposed only when exactly one live accepted invoice exists and is accessible.
Show child attributes
invoice_checks
object
required
Checks of the accepted invoices against this order, counted over every invoice like billing.
Show child attributes
line_items
object[]
required
Show child attributes
push_targets
object[]
required
Connections a native order can be pushed to; empty once the ERP holds it, and for imported orders.
Show child attributes
latest_push
object | null
required
The latest push of the order.
Show child attributes
push_readiness
object[]
required
What the order is missing before it can be pushed; empty when it is ready.
Show child attributes
to_fill
object[]
required
What an order made in Watchdog should still get: each dimension the organization requires that a draft does not carry yet (opening needs it), then the agreements that may cover it, while it links none. Fill each, or ask the person. Empty when nothing is missing, and for orders synced from an accounting system.
Option 1
Option 2
Show child attributes
sent_to_supplier
object | null
required
The latest revision sent to the supplier through Watchdog (sendPurchaseOrder), counting sends that went out or may have (accepted or unconfirmed emails); null when none went out.
Show child attributes
supplier_revision
integer | null
required
The latest revision whose terms the supplier has, or may have: sent through Watchdog or marked as sent outside it (sendPurchaseOrder), made by accepting the supplier's own proposal, or revision 1 of an order they confirmed before it opened. Null when they have none.
placement
enum<string>
required
watchdog: placed through Watchdog, with its approval and send. external: ordered outside Watchdog (a web shop, the phone) and recorded here; it needed no order approval and is not sent.
Available options:
watchdog,
external
approval
object | null
required
The order's approval request. A draft's latest: pending, or its decision. Past a draft, the one deciding a proposed revision while one waits, else the one that approved the terms in force. Null when it needed none (opened without approval, or imported), or a draft's request was withdrawn.
Show child attributes
approval_required
boolean
required
A draft that an approval rule for orders matches: opening it asks for approval instead. False for opened and imported orders.
opened_at
string<date-time> | null
required
closed_at
string<date-time> | null
required
cancelled_at
string<date-time> | null
required
archived_at
string<date-time> | null
required
import
object | null
required
The import that drafted the order from documents: what they show (intent), what the draft still needs (missing) and the parties as printed. Null for an order created otherwise.
Show child attributes
proposed_revision
object | null
required
A change to the order's terms waiting for a decision: an edit that needs approval, or what a supplier's confirmation prints differently. The order keeps its current revision, which is what is sent and pushed, until it is accepted; its terms cannot change meanwhile. Null when none waits.
Show child attributes
supplier_reply
object
required
What the order waits for from its supplier, and whether they confirmed it. Derived from the emails sent and the supplier's documents received.
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":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"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/purchase-orders/add-or-remove-purchase-order-approvers","slug":"/api-reference/endpoints/purchase-orders/add-or-remove-purchase-order-approvers","pageMetadata":{"title":"Add or remove purchase order approvers","description":"Adds and removes approvers by hand, at any time before a decision. On a draft that waits for nobody, approvers are picked, also while the draft is incomplete: they are asked once the draft is opened (updatePurchaseOrder with status open), and approval.sent stays false until then. On a draft that waits, or an open order whose proposed revision waits, they join that request. Removing the last approver withdraws a waiting request unless an approval rule requires approval. Any one approver decides, with updatePurchaseOrder and approval. Approval rules bind everyone but admins: removing an approver a rule added (other than yourself), or adding yourself to an order a rule already chose approvers for, returns 403; adding colleagues stays open. People removed here are not added back by approval rules until someone adds them again. Adding an approver or removing someone who is not one changes nothing. Added approvers of a waiting request are emailed unless they turned off Orders to approve; picked ones once the draft is opened. Recorded in the order's activity.","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","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: \"Adds and removes approvers by hand, at any time before a decision. On a draft that waits for nobody, approvers are picked, also while the draft is incomplete: they are asked once the draft is opened (updatePurchaseOrder with status open), and approval.sent stays false until then. On a draft that waits, or an open order whose proposed revision waits, they join that request. Removing the last approver withdraws a waiting request unless an approval rule requires approval. Any one approver decides, with updatePurchaseOrder and approval. Approval rules bind everyone but admins: removing an approver a rule added (other than yourself), or adding yourself to an order a rule already chose approvers for, returns 403; adding colleagues stays open. People removed here are not added back by approval rules until someone adds them again. Adding an approver or removing someone who is not one changes nothing. Added approvers of a waiting request are emailed unless they turned off Orders to approve; picked ones once the draft is opened. Recorded in the order’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":"Add or remove purchase order approvers","description":"Adds and removes approvers by hand, at any time before a decision. On a draft that waits for nobody, approvers are picked, also while the draft is incomplete: they are asked once the draft is opened (updatePurchaseOrder with status open), and approval.sent stays false until then. On a draft that waits, or an open order whose proposed revision waits, they join that request. Removing the last approver withdraws a waiting request unless an approval rule requires approval. Any one approver decides, with updatePurchaseOrder and approval. Approval rules bind everyone but admins: removing an approver a rule added (other than yourself), or adding yourself to an order a rule already chose approvers for, returns 403; adding colleagues stays open. People removed here are not added back by approval rules until someone adds them again. Adding an approver or removing someone who is not one changes nothing. Added approvers of a waiting request are emailed unless they turned off Orders to approve; picked ones once the draft is opened. Recorded in the order's activity.","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","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"updatePurchaseOrderApprovers","summary":"Add or remove purchase order approvers","description":"Adds and removes approvers by hand, at any time before a decision. On a draft that waits for nobody, approvers are picked, also while the draft is incomplete: they are asked once the draft is opened (updatePurchaseOrder with status open), and approval.sent stays false until then. On a draft that waits, or an open order whose proposed revision waits, they join that request. Removing the last approver withdraws a waiting request unless an approval rule requires approval. Any one approver decides, with updatePurchaseOrder and approval. Approval rules bind everyone but admins: removing an approver a rule added (other than yourself), or adding yourself to an order a rule already chose approvers for, returns 403; adding colleagues stays open. People removed here are not added back by approval rules until someone adds them again. Adding an approver or removing someone who is not one changes nothing. Added approvers of a waiting request are emailed unless they turned off Orders to approve; picked ones once the draft is opened. Recorded in the order's activity.","tags":["Purchase orders"],"parameters":["657c96c3-c467-4b9b-a6a5-6123a00ac44b","1e631dff-8ad1-44af-9270-8559a8afcd4e"],"security":["73faee5a-d597-4769-b6f7-f169a3736748"],"x-watchdog-access":"scoped","x-watchdog-permission":"write","x-watchdog-authentication":"organization","x-watchdog-public":true,"x-watchdog-mcp":true,"requestBody":"8b742c67-a72c-4aff-ba1c-8c05bd66611f","responses":{"200":"cc4b91b7-4fa8-4794-8cbb-8faea2b4fb36","400":"b958acbe-9440-4ef5-8bd9-9d9fa05566fe","401":"c2bb64e6-7ffb-4332-98b0-3f2545edf1ef","403":"18611ab5-5205-4f29-9ad3-4112667968ca","404":"2ef7224c-2517-4a5b-a654-ada386d8e158","409":"4860f77d-77d6-4695-b073-ce0bcb370cb9","429":"70116c61-e53f-4b1c-ad93-385e9f9383a2","500":"9593156f-391e-4168-bf08-17fb8fab3df1","503":"97d16df9-dd2b-4d72-a3a3-92ce868fdaff"},"method":"post","type":"path","servers":["0f259b2e-ff56-4327-8143-523787cf2165"],"path":"/v1/purchase-orders/{id}/update-approvers","baseUrlOptions":["https://api.watchdog.no"],"title":"Add or remove purchase order approvers","codeSamples":[],"requestExampleLanguages":["bash","javascript","python"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated","urlDisplay":"full"},"dependencies":{"parameters":{"657c96c3-c467-4b9b-a6a5-6123a00ac44b":{"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."},"1e631dff-8ad1-44af-9270-8559a8afcd4e":{"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":{"add_user_ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":255,"uniqueKey":"add_user_ids.items.[INDEX]","typeLabel":"string"},"maxItems":20,"default":[],"description":"Members to add as approvers: members with write access who can see the order.","uniqueKey":"add_user_ids","typeLabel":"string[]"},"remove_user_ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":255,"uniqueKey":"remove_user_ids.items.[INDEX]","typeLabel":"string"},"maxItems":20,"default":[],"description":"People to remove as approvers.","uniqueKey":"remove_user_ids","typeLabel":"string[]"},"add_team_ids":{"type":"array","items":{"type":"string","format":"uuid","uniqueKey":"add_team_ids.items.[INDEX]","typeLabel":"string\u003cuuid>"},"maxItems":20,"default":[],"description":"Teams to add as approvers: each counts as one approver, and any member with write access who can see the order may decide for it. Each needs such a member.","uniqueKey":"add_team_ids","typeLabel":"string\u003cuuid>[]"},"remove_team_ids":{"type":"array","items":{"type":"string","format":"uuid","uniqueKey":"remove_team_ids.items.[INDEX]","typeLabel":"string\u003cuuid>"},"maxItems":20,"default":[],"description":"Teams to remove as approvers.","uniqueKey":"remove_team_ids","typeLabel":"string\u003cuuid>[]"}},"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"add_user_ids":[],"remove_user_ids":[],"add_team_ids":[],"remove_team_ids":[]}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"cc4b91b7-4fa8-4794-8cbb-8faea2b4fb36":{"description":"The purchase order.","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","properties":{"company_id":{"type":"string","format":"uuid","description":"The company that places the order. Its buyer is the company's own recipient, unless an imported order names another.","isRequired":true,"uniqueKey":"company_id","typeLabel":"string\u003cuuid>"},"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"id","typeLabel":"string\u003cuuid>"},"number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"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"},"status":{"type":"string","enum":["draft","open","closed","cancelled"],"description":"closed means closed for invoicing, set by a person; it is not derived from an ERP receipt status. Waiting for approval is not a status: see awaiting_approval.","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"awaiting_approval":{"type":"boolean","description":"The order has an approval request pending: a draft opens once approved; on an opened order it decides the proposed revision, while the current revision stays in force and can be sent and pushed.","isRequired":true,"uniqueKey":"awaiting_approval","typeLabel":"boolean"},"approvers":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$","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"}},"required":["user_id","first_name","last_name","email"],"uniqueKey":"approvers.items.[INDEX]","typeLabel":"object"},"description":"The people the pending approval request waits for, in the order they were added; empty when none is pending. Teams it waits for are on approval.approver_teams. Who decided an earlier request is on approval.","isRequired":true,"uniqueKey":"approvers","typeLabel":"object[]"},"archived":{"type":"boolean","isRequired":true,"uniqueKey":"archived","typeLabel":"boolean"},"supplier":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"supplier.oneOf.0.id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","isRequired":true,"uniqueKey":"supplier.oneOf.0.name","typeLabel":"string"},"organization_number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"supplier.oneOf.0.organization_number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"supplier.oneOf.0.organization_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"supplier.oneOf.0.organization_number","typeLabel":"string | null"}},"required":["id","name","organization_number"],"isRequired":true,"uniqueKey":"supplier.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"organization_number":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","organization_number"],"isRequired":true,"uniqueKey":"supplier.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"supplier","typeLabel":"object | null"},"buyer":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"buyer.oneOf.0.id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","isRequired":true,"uniqueKey":"buyer.oneOf.0.name","typeLabel":"string"},"organization_number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"buyer.oneOf.0.organization_number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"buyer.oneOf.0.organization_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"buyer.oneOf.0.organization_number","typeLabel":"string | null"}},"required":["id","name","organization_number"],"description":"A recipient: the legal entity that placed the order.","isRequired":true,"uniqueKey":"buyer.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"organization_number":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","organization_number"],"description":"A recipient: the legal entity that placed the order.","isRequired":true,"uniqueKey":"buyer.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"buyer","typeLabel":"object | null"},"owner_user_id":{"oneOf":[{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$","isRequired":true,"uniqueKey":"owner_user_id.oneOf.0","typeLabel":"string"},{"type":"null","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$","isRequired":true,"uniqueKey":"owner_user_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"owner_user_id","typeLabel":"string | null"},"agreement":{"oneOf":[{"type":"object","properties":{"id":{"oneOf":[{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"agreement.oneOf.0.id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","isRequired":true,"uniqueKey":"agreement.oneOf.0.id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"agreement.oneOf.0.id","typeLabel":"string\u003cuuid> | null"},"title":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"agreement.oneOf.0.title.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"agreement.oneOf.0.title.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"agreement.oneOf.0.title","typeLabel":"string | null"},"origin":{"type":"string","enum":["manual","automatic"],"isRequired":true,"uniqueKey":"agreement.oneOf.0.origin","typeLabel":"enum\u003cstring>"},"restricted":{"type":"boolean","description":"True when the caller cannot see the agreement; id and title are then null.","isRequired":true,"uniqueKey":"agreement.oneOf.0.restricted","typeLabel":"boolean"}},"required":["id","title","origin","restricted"],"isRequired":true,"uniqueKey":"agreement.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"title":{"oneOf":[{"type":"string"},{"type":"null"}]},"origin":{"type":"string","enum":["manual","automatic"]},"restricted":{"type":"boolean","description":"True when the caller cannot see the agreement; id and title are then null."}},"required":["id","title","origin","restricted"],"isRequired":true,"uniqueKey":"agreement.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"agreement","typeLabel":"object | null"},"currency_code":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"currency_code.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"currency_code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"currency_code","typeLabel":"string | null"},"commitment_basis":{"type":"string","enum":["lines","amount_limit"],"description":"lines: the order commits to its active lines. amount_limit: it commits to amount_limit for the scope in scope_description; its lines are price references.","isRequired":true,"uniqueKey":"commitment_basis","typeLabel":"enum\u003cstring>"},"totals":{"type":"object","properties":{"lines_excluding_vat":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Active lines, excluding VAT.","isRequired":true,"uniqueKey":"totals.lines_excluding_vat","typeLabel":"string"},"commitment":{"oneOf":[{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Active lines for a lines order, amount_limit for an amount-limit order.","isRequired":true,"uniqueKey":"totals.commitment.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Active lines for a lines order, amount_limit for an amount-limit order.","isRequired":true,"uniqueKey":"totals.commitment.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"totals.commitment","typeLabel":"string | null"},"expected":{"oneOf":[{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the order is expected to cost, excluding VAT: the budget, when set, while a lines order has no active lines; otherwise commitment.","isRequired":true,"uniqueKey":"totals.expected.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^-?\\d+(?:\\.\\d+)?$","description":"What the order is expected to cost, excluding VAT: the budget, when set, while a lines order has no active lines; otherwise commitment.","isRequired":true,"uniqueKey":"totals.expected.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"totals.expected","typeLabel":"string | null"}},"required":["lines_excluding_vat","commitment","expected"],"isRequired":true,"uniqueKey":"totals","typeLabel":"object"},"billing":{"type":"object","properties":{"linked_invoices":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"billing.linked_invoices","typeLabel":"integer"},"billed":{"type":"string","isRequired":true,"uniqueKey":"billing.billed","typeLabel":"string"},"remaining":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"billing.remaining.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"billing.remaining.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billing.remaining","typeLabel":"string | null"},"excess":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"billing.excess.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"billing.excess.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billing.excess","typeLabel":"string | null"},"authoritative":{"type":"boolean","isRequired":true,"uniqueKey":"billing.authoritative","typeLabel":"boolean"},"coverage":{"type":"object","properties":{"pending_suggestions":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"billing.coverage.pending_suggestions","typeLabel":"integer"},"unsupported_credits":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"billing.coverage.unsupported_credits","typeLabel":"integer"},"incompatible_invoices":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"billing.coverage.incompatible_invoices","typeLabel":"integer"},"invalid_invoices":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"billing.coverage.invalid_invoices","typeLabel":"integer"},"unassigned_invoices":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"billing.coverage.unassigned_invoices","typeLabel":"integer"},"reconciliation_pending":{"type":"boolean","isRequired":true,"uniqueKey":"billing.coverage.reconciliation_pending","typeLabel":"boolean"}},"required":["pending_suggestions","unsupported_credits","incompatible_invoices","invalid_invoices","unassigned_invoices","reconciliation_pending"],"isRequired":true,"uniqueKey":"billing.coverage","typeLabel":"object"},"untied":{"oneOf":[{"type":"object","properties":{"lines":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"billing.untied.oneOf.0.lines","typeLabel":"integer"},"amount":{"type":"string","isRequired":true,"uniqueKey":"billing.untied.oneOf.0.amount","typeLabel":"string"}},"required":["lines","amount"],"isRequired":true,"uniqueKey":"billing.untied.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"lines":{"type":"integer","minimum":0},"amount":{"type":"string"}},"required":["lines","amount"],"isRequired":true,"uniqueKey":"billing.untied.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billing.untied","typeLabel":"object | null"}},"required":["linked_invoices","billed","remaining","excess","authoritative","coverage","untied"],"isRequired":true,"uniqueKey":"billing","typeLabel":"object"},"revision":{"oneOf":[{"type":"integer","description":"The current commercial revision; null for a draft.","isRequired":true,"uniqueKey":"revision.oneOf.0","typeLabel":"integer"},{"type":"null","description":"The current commercial revision; null for a draft.","isRequired":true,"uniqueKey":"revision.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"revision","typeLabel":"integer | null"},"open_alert_count":{"type":"integer","minimum":0,"description":"Visible, live alerts from checking the order's invoices against it: neither dismissed, skipped nor credited.","isRequired":true,"uniqueKey":"open_alert_count","typeLabel":"integer"},"valid_until":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"valid_until.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"valid_until.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"valid_until","typeLabel":"string | null"},"origin":{"type":"string","enum":["native","imported"],"description":"Where the order was born and is edited: `native` in Watchdog, `imported` in the ERP in `source`.","isRequired":true,"uniqueKey":"origin","typeLabel":"enum\u003cstring>"},"source":{"oneOf":[{"type":"object","properties":{"system":{"type":"string","description":"The other system: an ERP, such as tripletex, or the name the creator gave.","isRequired":true,"uniqueKey":"source.oneOf.0.system","typeLabel":"string"},"id":{"type":"string","description":"That system's own ID for the order.","isRequired":true,"uniqueKey":"source.oneOf.0.id","typeLabel":"string"},"number":{"oneOf":[{"type":"string","description":"That system's number for the order; for a pushed order, the one the ERP assigned. Invoices citing it match the order.","isRequired":true,"uniqueKey":"source.oneOf.0.number.oneOf.0","typeLabel":"string"},{"type":"null","description":"That system's number for the order; for a pushed order, the one the ERP assigned. Invoices citing it match the order.","isRequired":true,"uniqueKey":"source.oneOf.0.number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"source.oneOf.0.number","typeLabel":"string | null"},"channel":{"type":"string","enum":["integration","api"],"description":"`integration`: a connection imports or pushes the order and keeps the fields below. `api`: linked when the order was created; nothing syncs it.","isRequired":true,"uniqueKey":"source.oneOf.0.channel","typeLabel":"enum\u003cstring>"},"status":{"oneOf":[{"type":"string","description":"That system's own status for the order, as given.","isRequired":true,"uniqueKey":"source.oneOf.0.status.oneOf.0","typeLabel":"string"},{"type":"null","description":"That system's own status for the order, as given.","isRequired":true,"uniqueKey":"source.oneOf.0.status.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"source.oneOf.0.status","typeLabel":"string | null"},"refreshed_at":{"oneOf":[{"type":"string","format":"date-time","description":"When the ERP and Watchdog last agreed on the order; null while a push is unfinished.","isRequired":true,"uniqueKey":"source.oneOf.0.refreshed_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the ERP and Watchdog last agreed on the order; null while a push is unfinished.","isRequired":true,"uniqueKey":"source.oneOf.0.refreshed_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"source.oneOf.0.refreshed_at","typeLabel":"string\u003cdate-time> | null"},"synced_revision":{"oneOf":[{"type":"integer","description":"The revision the ERP verifiably holds; null while a push is unfinished.","isRequired":true,"uniqueKey":"source.oneOf.0.synced_revision.oneOf.0","typeLabel":"integer"},{"type":"null","description":"The revision the ERP verifiably holds; null while a push is unfinished.","isRequired":true,"uniqueKey":"source.oneOf.0.synced_revision.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"source.oneOf.0.synced_revision","typeLabel":"integer | null"},"pending":{"type":"boolean","description":"A native order's current revision is not in the ERP yet: never pushed, or amended since.","isRequired":true,"uniqueKey":"source.oneOf.0.pending","typeLabel":"boolean"}},"required":["system","id","number","channel","status","refreshed_at","synced_revision","pending"],"description":"The order's ERP. An imported order's terms, lines and cancellation change there and the next sync brings them in; a native order is pushed there and its copy follows Watchdog.","isRequired":true,"uniqueKey":"source.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"system":{"type":"string","description":"The other system: an ERP, such as tripletex, or the name the creator gave."},"id":{"type":"string","description":"That system's own ID for the order."},"number":{"oneOf":[{"type":"string","description":"That system's number for the order; for a pushed order, the one the ERP assigned. Invoices citing it match the order."},{"type":"null","description":"That system's number for the order; for a pushed order, the one the ERP assigned. Invoices citing it match the order."}]},"channel":{"type":"string","enum":["integration","api"],"description":"`integration`: a connection imports or pushes the order and keeps the fields below. `api`: linked when the order was created; nothing syncs it."},"status":{"oneOf":[{"type":"string","description":"That system's own status for the order, as given."},{"type":"null","description":"That system's own status for the order, as given."}]},"refreshed_at":{"oneOf":[{"type":"string","format":"date-time","description":"When the ERP and Watchdog last agreed on the order; null while a push is unfinished."},{"type":"null","format":"date-time","description":"When the ERP and Watchdog last agreed on the order; null while a push is unfinished."}]},"synced_revision":{"oneOf":[{"type":"integer","description":"The revision the ERP verifiably holds; null while a push is unfinished."},{"type":"null","description":"The revision the ERP verifiably holds; null while a push is unfinished."}]},"pending":{"type":"boolean","description":"A native order's current revision is not in the ERP yet: never pushed, or amended since."}},"required":["system","id","number","channel","status","refreshed_at","synced_revision","pending"],"description":"The order's ERP. An imported order's terms, lines and cancellation change there and the next sync brings them in; a native order is pushed there and its copy follows Watchdog.","isRequired":true,"uniqueKey":"source.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"source","typeLabel":"object | null"},"from_import":{"type":"boolean","description":"Drafted from documents through createPurchaseOrderImport; import has the details.","isRequired":true,"uniqueKey":"from_import","typeLabel":"boolean"},"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>"},"lifecycle":{"type":"object","properties":{"status":{"type":"string","enum":["draft","awaiting_approval","open","closed","cancelled"],"description":"Where the order is in its life: its status, except that a draft with an approval request pending reads awaiting_approval. An open order whose proposed revision waits for approval stays open. Read-only; set the order's status through PATCH.","isRequired":true,"uniqueKey":"lifecycle.status","typeLabel":"enum\u003cstring>"},"blockers":{"type":"array","items":{"type":"string","enum":["archived","no_number","no_supplier","no_buyer","no_currency","no_lines","negative_total","no_amount_limit","no_scope","no_required_dimension"],"uniqueKey":"lifecycle.blockers.items.[INDEX]","typeLabel":"enum\u003cstring>"},"description":"What opening the order would be refused for, as PATCH with status open refuses it: archived (restore it first), then what it is missing (no_required_dimension: a dimension the organization requires on orders, settings.purchase_order_required_dimensions). Only for draft and awaiting_approval, empty otherwise. A number another order took is found only when it opens.","isRequired":true,"uniqueKey":"lifecycle.blockers","typeLabel":"enum\u003cstring>[]"},"next_action":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["restore","record_ordered","approve","await_approval","decide_proposal","ask_price","await_supplier","request_approval","open","open_and_send","send","close"],"description":"restore: unarchive it. record_ordered: save an order placed outside Watchdog as ordered. approve: decide its approval request. await_approval: its approvers decide. decide_proposal: accept or reject the proposed revision. ask_price: ask the supplier for a price. await_supplier: the supplier has not answered the price request. request_approval: open it, which asks for approval. open: open it; the supplier already confirmed it. open_and_send: open it and send it to the supplier. send: send the current revision to the supplier. close: it is invoiced to its value.","isRequired":true,"uniqueKey":"lifecycle.next_action.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"mine":{"type":"boolean","description":"Whether the caller may take this step.","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 of whoever else the step waits on, for await_approval; empty otherwise.","isRequired":true,"uniqueKey":"lifecycle.next_action.oneOf.0.waiting_on","typeLabel":"string[]"},"disabled_by":{"type":"array","items":{"type":"string","enum":["archived","no_number","no_supplier","no_buyer","no_currency","no_lines","negative_total","no_amount_limit","no_scope","no_required_dimension"],"uniqueKey":"lifecycle.next_action.oneOf.0.disabled_by.items.[INDEX]","typeLabel":"enum\u003cstring>"},"description":"What must be fixed before the step can be taken; empty when it can be now.","isRequired":true,"uniqueKey":"lifecycle.next_action.oneOf.0.disabled_by","typeLabel":"enum\u003cstring>[]"}},"required":["kind","mine","waiting_on","disabled_by"],"description":"The order's one next step. Null when nothing waits, and always for an imported order, which its accounting system decides.","isRequired":true,"uniqueKey":"lifecycle.next_action.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"kind":{"type":"string","enum":["restore","record_ordered","approve","await_approval","decide_proposal","ask_price","await_supplier","request_approval","open","open_and_send","send","close"],"description":"restore: unarchive it. record_ordered: save an order placed outside Watchdog as ordered. approve: decide its approval request. await_approval: its approvers decide. decide_proposal: accept or reject the proposed revision. ask_price: ask the supplier for a price. await_supplier: the supplier has not answered the price request. request_approval: open it, which asks for approval. open: open it; the supplier already confirmed it. open_and_send: open it and send it to the supplier. send: send the current revision to the supplier. close: it is invoiced to its value."},"mine":{"type":"boolean","description":"Whether the caller may take this step."},"waiting_on":{"type":"array","items":{"type":"string"},"description":"User IDs of whoever else the step waits on, for await_approval; empty otherwise."},"disabled_by":{"type":"array","items":{"type":"string","enum":["archived","no_number","no_supplier","no_buyer","no_currency","no_lines","negative_total","no_amount_limit","no_scope","no_required_dimension"]},"description":"What must be fixed before the step can be taken; empty when it can be now."}},"required":["kind","mine","waiting_on","disabled_by"],"description":"The order's one next step. Null when nothing waits, and always for an imported order, which its accounting system decides.","isRequired":true,"uniqueKey":"lifecycle.next_action.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lifecycle.next_action","typeLabel":"object | null"}},"required":["status","blockers","next_action"],"isRequired":true,"uniqueKey":"lifecycle","typeLabel":"object"},"emails":{"type":"object","properties":{"message":{"type":"boolean","description":"A message to the supplier can be sent.","isRequired":true,"uniqueKey":"emails.message","typeLabel":"boolean"},"price_request":{"type":"boolean","description":"A price request can be sent: a draft.","isRequired":true,"uniqueKey":"emails.price_request","typeLabel":"boolean"},"order":{"type":"boolean","description":"The order can be sent by email: an open order.","isRequired":true,"uniqueKey":"emails.order","typeLabel":"boolean"}},"required":["message","price_request","order"],"description":"Which emails the order may send its supplier, as the send endpoints enforce them. None for an imported or archived order; messages also after it is closed or cancelled.","isRequired":true,"uniqueKey":"emails","typeLabel":"object"},"status_reason":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"status_reason.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"status_reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"status_reason","typeLabel":"string | null"},"owner":{"oneOf":[{"type":"object","properties":{"user_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$","isRequired":true,"uniqueKey":"owner.oneOf.0.user_id","typeLabel":"string"},"first_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"owner.oneOf.0.first_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"owner.oneOf.0.first_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"owner.oneOf.0.first_name","typeLabel":"string | null"},"last_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"owner.oneOf.0.last_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"owner.oneOf.0.last_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"owner.oneOf.0.last_name","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"owner.oneOf.0.email.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"owner.oneOf.0.email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"owner.oneOf.0.email","typeLabel":"string | null"}},"required":["user_id","first_name","last_name","email"],"isRequired":true,"uniqueKey":"owner.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"user_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"},"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"],"isRequired":true,"uniqueKey":"owner.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"owner","typeLabel":"object | null"},"invoice_approvers":{"type":"object","properties":{"people":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$","isRequired":true,"uniqueKey":"invoice_approvers.people.items.[INDEX].user_id","typeLabel":"string"},"first_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"invoice_approvers.people.items.[INDEX].first_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"invoice_approvers.people.items.[INDEX].first_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"invoice_approvers.people.items.[INDEX].first_name","typeLabel":"string | null"},"last_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"invoice_approvers.people.items.[INDEX].last_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"invoice_approvers.people.items.[INDEX].last_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"invoice_approvers.people.items.[INDEX].last_name","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"invoice_approvers.people.items.[INDEX].email.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"invoice_approvers.people.items.[INDEX].email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"invoice_approvers.people.items.[INDEX].email","typeLabel":"string | null"},"step":{"type":"integer","exclusiveMinimum":0,"description":"The approver's step, from 1. Steps set only the order in which the invoice's approvers are asked; the invoice is approved at the organization's number of approvals, however many steps there are.","isRequired":true,"uniqueKey":"invoice_approvers.people.items.[INDEX].step","typeLabel":"integer"}},"required":["user_id","first_name","last_name","email","step"],"uniqueKey":"invoice_approvers.people.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"invoice_approvers.people","typeLabel":"object[]"},"teams":{"type":"array","items":{"type":"object","properties":{"team_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"invoice_approvers.teams.items.[INDEX].team_id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","isRequired":true,"uniqueKey":"invoice_approvers.teams.items.[INDEX].name","typeLabel":"string"},"step":{"type":"integer","exclusiveMinimum":0,"description":"The approver's step, from 1. Steps set only the order in which the invoice's approvers are asked; the invoice is approved at the organization's number of approvals, however many steps there are.","isRequired":true,"uniqueKey":"invoice_approvers.teams.items.[INDEX].step","typeLabel":"integer"}},"required":["team_id","name","step"],"uniqueKey":"invoice_approvers.teams.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"invoice_approvers.teams","typeLabel":"object[]"}},"required":["people","teams"],"description":"Who approves the invoices matched to the order, by step and then in the order they were added; not approval.approvers, who approve the order itself. An invoice that bills the order gets them in their steps once Watchdog has read and checked it, in place of the approval rules' approvers. Set with updatePurchaseOrder invoice_approvers.","isRequired":true,"uniqueKey":"invoice_approvers","typeLabel":"object"},"amount_limit":{"oneOf":[{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Excluding VAT.","isRequired":true,"uniqueKey":"amount_limit.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Excluding VAT.","isRequired":true,"uniqueKey":"amount_limit.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"amount_limit","typeLabel":"string | null"},"unordered_charges":{"type":"string","enum":["flag","accept"],"description":"Invoice lines the order's lines don't cover, like freight: flag raises an unordered_charge alert, accept accepts them up to unordered_charges_limit.","isRequired":true,"uniqueKey":"unordered_charges","typeLabel":"enum\u003cstring>"},"unordered_charges_limit":{"oneOf":[{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Set only with accept: the most accepted across the order's invoices, excluding VAT; null accepts them all.","isRequired":true,"uniqueKey":"unordered_charges_limit.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Set only with accept: the most accepted across the order's invoices, excluding VAT; null accepts them all.","isRequired":true,"uniqueKey":"unordered_charges_limit.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"unordered_charges_limit","typeLabel":"string | null"},"scope_description":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"scope_description.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"scope_description.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"scope_description","typeLabel":"string | null"},"issued_date":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"issued_date.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"issued_date.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"issued_date","typeLabel":"string | null"},"valid_from":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"valid_from.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"valid_from.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"valid_from","typeLabel":"string | null"},"delivery_date":{"oneOf":[{"type":"string","description":"When the goods or service are expected. Needed to push the order.","isRequired":true,"uniqueKey":"delivery_date.oneOf.0","typeLabel":"string"},{"type":"null","description":"When the goods or service are expected. Needed to push the order.","isRequired":true,"uniqueKey":"delivery_date.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"delivery_date","typeLabel":"string | null"},"delivery":{"oneOf":[{"type":"object","properties":{"name":{"oneOf":[{"type":"string","description":"Who receives the delivery (Peppol DeliveryParty name).","isRequired":true,"uniqueKey":"delivery.oneOf.0.name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Who receives the delivery (Peppol DeliveryParty name).","isRequired":true,"uniqueKey":"delivery.oneOf.0.name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"delivery.oneOf.0.name","typeLabel":"string | null"},"address":{"type":"object","properties":{"street":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"delivery.oneOf.0.address.street.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"delivery.oneOf.0.address.street.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"delivery.oneOf.0.address.street","typeLabel":"string | null"},"postal_code":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"delivery.oneOf.0.address.postal_code.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"delivery.oneOf.0.address.postal_code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"delivery.oneOf.0.address.postal_code","typeLabel":"string | null"},"city":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"delivery.oneOf.0.address.city.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"delivery.oneOf.0.address.city.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"delivery.oneOf.0.address.city","typeLabel":"string | null"},"country_code":{"oneOf":[{"type":"string","description":"ISO 3166-1 alpha-2.","isRequired":true,"uniqueKey":"delivery.oneOf.0.address.country_code.oneOf.0","typeLabel":"string"},{"type":"null","description":"ISO 3166-1 alpha-2.","isRequired":true,"uniqueKey":"delivery.oneOf.0.address.country_code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"delivery.oneOf.0.address.country_code","typeLabel":"string | null"}},"required":["street","postal_code","city","country_code"],"description":"Peppol Delivery/DeliveryLocation/Address.","isRequired":true,"uniqueKey":"delivery.oneOf.0.address","typeLabel":"object"}},"required":["name","address"],"description":"Where to deliver. Null delivers to the buyer's own address. Changing it on an opened order records a revision.","isRequired":true,"uniqueKey":"delivery.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"name":{"oneOf":[{"type":"string","description":"Who receives the delivery (Peppol DeliveryParty name)."},{"type":"null","description":"Who receives the delivery (Peppol DeliveryParty name)."}]},"address":{"type":"object","properties":{"street":{"oneOf":[{"type":"string"},{"type":"null"}]},"postal_code":{"oneOf":[{"type":"string"},{"type":"null"}]},"city":{"oneOf":[{"type":"string"},{"type":"null"}]},"country_code":{"oneOf":[{"type":"string","description":"ISO 3166-1 alpha-2."},{"type":"null","description":"ISO 3166-1 alpha-2."}]}},"required":["street","postal_code","city","country_code"],"description":"Peppol Delivery/DeliveryLocation/Address."}},"required":["name","address"],"description":"Where to deliver. Null delivers to the buyer's own address. Changing it on an opened order records a revision.","isRequired":true,"uniqueKey":"delivery.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"delivery","typeLabel":"object | null"},"buyer_reference":{"oneOf":[{"type":"string","description":"While a draft, empty or still the owner's name, it follows the owner's name. A reference a person writes stays.","isRequired":true,"uniqueKey":"buyer_reference.oneOf.0","typeLabel":"string"},{"type":"null","description":"While a draft, empty or still the owner's name, it follows the owner's name. A reference a person writes stays.","isRequired":true,"uniqueKey":"buyer_reference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"buyer_reference","typeLabel":"string | null"},"sales_order_reference":{"oneOf":[{"type":"string","description":"The supplier's order or confirmation number (Peppol SalesOrderID).","isRequired":true,"uniqueKey":"sales_order_reference.oneOf.0","typeLabel":"string"},{"type":"null","description":"The supplier's order or confirmation number (Peppol SalesOrderID).","isRequired":true,"uniqueKey":"sales_order_reference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sales_order_reference","typeLabel":"string | null"},"contract_reference":{"oneOf":[{"type":"string","description":"While a draft, empty or still the linked agreement's number, it follows the agreement's number.","isRequired":true,"uniqueKey":"contract_reference.oneOf.0","typeLabel":"string"},{"type":"null","description":"While a draft, empty or still the linked agreement's number, it follows the agreement's number.","isRequired":true,"uniqueKey":"contract_reference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"contract_reference","typeLabel":"string | null"},"project_reference":{"oneOf":[{"type":"string","description":"While a draft, empty or still the code of the order's project (its value of a project dimension), it follows that code.","isRequired":true,"uniqueKey":"project_reference.oneOf.0","typeLabel":"string"},{"type":"null","description":"While a draft, empty or still the code of the order's project (its value of a project dimension), it follows that code.","isRequired":true,"uniqueKey":"project_reference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"project_reference","typeLabel":"string | null"},"dimension_values":{"type":"array","items":{"type":"object","properties":{"dimension_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"dimension_values.items.[INDEX].dimension_id","typeLabel":"string\u003cuuid>"},"dimension_name":{"type":"string","isRequired":true,"uniqueKey":"dimension_values.items.[INDEX].dimension_name","typeLabel":"string"},"dimension_kind":{"type":"string","enum":["department","project","custom"],"description":"The dimension's kind: a project's value fills the order's project reference.","isRequired":true,"uniqueKey":"dimension_values.items.[INDEX].dimension_kind","typeLabel":"enum\u003cstring>"},"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"dimension_values.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","isRequired":true,"uniqueKey":"dimension_values.items.[INDEX].name","typeLabel":"string"},"usable":{"type":"boolean","description":"Active and still in the chart of accounts; a line keeps a code that went.","isRequired":true,"uniqueKey":"dimension_values.items.[INDEX].usable","typeLabel":"boolean"},"code":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"dimension_values.items.[INDEX].code.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"dimension_values.items.[INDEX].code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"dimension_values.items.[INDEX].code","typeLabel":"string | null"}},"required":["dimension_id","dimension_name","dimension_kind","id","name","usable","code"],"uniqueKey":"dimension_values.items.[INDEX]","typeLabel":"object"},"description":"Where the order's cost is booked, in its company: each line takes these, except where it holds its own value for that dimension, and invoices billing the order take them as coding suggestions. Not part of the terms, so revisions leave it out.","isRequired":true,"uniqueKey":"dimension_values","typeLabel":"object[]"},"note_to_supplier":{"oneOf":[{"type":"string","description":"Free text for the supplier, printed on the order (Peppol Order Note).","isRequired":true,"uniqueKey":"note_to_supplier.oneOf.0","typeLabel":"string"},{"type":"null","description":"Free text for the supplier, printed on the order (Peppol Order Note).","isRequired":true,"uniqueKey":"note_to_supplier.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"note_to_supplier","typeLabel":"string | null"},"internal_note":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"internal_note.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"internal_note.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"internal_note","typeLabel":"string | null"},"budget":{"oneOf":[{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Excluding VAT, internal: what the organization expects to spend. Never printed, sent or pushed.","isRequired":true,"uniqueKey":"budget.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Excluding VAT, internal: what the organization expects to spend. Never printed, sent or pushed.","isRequired":true,"uniqueKey":"budget.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"budget","typeLabel":"string | null"},"billing_review":{"type":"object","properties":{"amount_status":{"type":"string","enum":["unknown","not_invoiced","partial","at_value","over"],"isRequired":true,"uniqueKey":"billing_review.amount_status","typeLabel":"enum\u003cstring>"},"single_invoice":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"billing_review.single_invoice.oneOf.0.id","typeLabel":"string\u003cuuid>"},"number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"billing_review.single_invoice.oneOf.0.number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"billing_review.single_invoice.oneOf.0.number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billing_review.single_invoice.oneOf.0.number","typeLabel":"string | null"}},"required":["id","number"],"isRequired":true,"uniqueKey":"billing_review.single_invoice.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"id":{"type":"string","format":"uuid"},"number":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["id","number"],"isRequired":true,"uniqueKey":"billing_review.single_invoice.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billing_review.single_invoice","typeLabel":"object | null"},"quantity":{"type":"object","properties":{"single_invoice_id":{"oneOf":[{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"billing_review.quantity.single_invoice_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","isRequired":true,"uniqueKey":"billing_review.quantity.single_invoice_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billing_review.quantity.single_invoice_id","typeLabel":"string\u003cuuid> | null"},"lines":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"billing_review.quantity.lines","typeLabel":"integer"},"invoices":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"billing_review.quantity.invoices","typeLabel":"integer"},"amount":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"billing_review.quantity.amount.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"billing_review.quantity.amount.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billing_review.quantity.amount","typeLabel":"string | null"}},"required":["single_invoice_id","lines","invoices","amount"],"isRequired":true,"uniqueKey":"billing_review.quantity","typeLabel":"object"},"received":{"type":"object","properties":{"single_invoice_id":{"oneOf":[{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"billing_review.received.single_invoice_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","isRequired":true,"uniqueKey":"billing_review.received.single_invoice_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billing_review.received.single_invoice_id","typeLabel":"string\u003cuuid> | null"},"lines":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"billing_review.received.lines","typeLabel":"integer"},"invoices":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"billing_review.received.invoices","typeLabel":"integer"},"amount":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"billing_review.received.amount.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"billing_review.received.amount.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billing_review.received.amount","typeLabel":"string | null"}},"required":["single_invoice_id","lines","invoices","amount"],"description":"Invoiced within the order but above what was received, on orders that record receipts.","isRequired":true,"uniqueKey":"billing_review.received","typeLabel":"object"},"unit_price":{"type":"object","properties":{"single_invoice_id":{"oneOf":[{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"billing_review.unit_price.single_invoice_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","isRequired":true,"uniqueKey":"billing_review.unit_price.single_invoice_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billing_review.unit_price.single_invoice_id","typeLabel":"string\u003cuuid> | null"},"lines":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"billing_review.unit_price.lines","typeLabel":"integer"},"invoices":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"billing_review.unit_price.invoices","typeLabel":"integer"},"amount":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"billing_review.unit_price.amount.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"billing_review.unit_price.amount.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billing_review.unit_price.amount","typeLabel":"string | null"}},"required":["single_invoice_id","lines","invoices","amount"],"isRequired":true,"uniqueKey":"billing_review.unit_price","typeLabel":"object"},"vat_rate":{"type":"object","properties":{"single_invoice_id":{"oneOf":[{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"billing_review.vat_rate.single_invoice_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","isRequired":true,"uniqueKey":"billing_review.vat_rate.single_invoice_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billing_review.vat_rate.single_invoice_id","typeLabel":"string\u003cuuid> | null"},"lines":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"billing_review.vat_rate.lines","typeLabel":"integer"},"invoices":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"billing_review.vat_rate.invoices","typeLabel":"integer"},"amount":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"billing_review.vat_rate.amount.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"billing_review.vat_rate.amount.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billing_review.vat_rate.amount","typeLabel":"string | null"}},"required":["single_invoice_id","lines","invoices","amount"],"description":"Invoiced at a higher VAT rate than the order line states.","isRequired":true,"uniqueKey":"billing_review.vat_rate","typeLabel":"object"},"unmatched":{"type":"object","properties":{"single_invoice_id":{"oneOf":[{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"billing_review.unmatched.single_invoice_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","isRequired":true,"uniqueKey":"billing_review.unmatched.single_invoice_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billing_review.unmatched.single_invoice_id","typeLabel":"string\u003cuuid> | null"},"lines":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"billing_review.unmatched.lines","typeLabel":"integer"},"invoices":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"billing_review.unmatched.invoices","typeLabel":"integer"},"amount":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"billing_review.unmatched.amount.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"billing_review.unmatched.amount.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billing_review.unmatched.amount","typeLabel":"string | null"}},"required":["single_invoice_id","lines","invoices","amount"],"isRequired":true,"uniqueKey":"billing_review.unmatched","typeLabel":"object"},"lines":{"type":"array","items":{"type":"object","properties":{"purchase_order_line_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"billing_review.lines.items.[INDEX].purchase_order_line_id","typeLabel":"string\u003cuuid>"},"codes":{"type":"array","items":{"type":"string","enum":["quantity","received","unit_price","vat_rate"],"uniqueKey":"billing_review.lines.items.[INDEX].codes.items.[INDEX]","typeLabel":"enum\u003cstring>"},"isRequired":true,"uniqueKey":"billing_review.lines.items.[INDEX].codes","typeLabel":"enum\u003cstring>[]"}},"required":["purchase_order_line_id","codes"],"uniqueKey":"billing_review.lines.items.[INDEX]","typeLabel":"object"},"description":"Order lines with an unresolved quantity, receipt, unit price or VAT rate finding, by the same predicates as the categories. A grouped invoice line names every order line it covers.","isRequired":true,"uniqueKey":"billing_review.lines","typeLabel":"object[]"}},"required":["amount_status","single_invoice","quantity","received","unit_price","vat_rate","unmatched","lines"],"description":"Visible unresolved billing findings. Single invoice is exposed only when exactly one live accepted invoice exists and is accessible.","isRequired":true,"uniqueKey":"billing_review","typeLabel":"object"},"invoice_checks":{"type":"object","properties":{"checked":{"type":"integer","minimum":0,"description":"Accepted invoices with a completed check.","isRequired":true,"uniqueKey":"invoice_checks.checked","typeLabel":"integer"}},"required":["checked"],"description":"Checks of the accepted invoices against this order, counted over every invoice like billing.","isRequired":true,"uniqueKey":"invoice_checks","typeLabel":"object"},"line_items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"line_items.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"line_reference":{"type":"string","description":"The line identifier as the supplier sees it (Peppol LineItem/ID). Never reused once the order is opened; lines are listed in their display order. Invoice lines are never matched on it.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].line_reference","typeLabel":"string"},"item":{"type":"object","properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"line_items.items.[INDEX].item.name","typeLabel":"string"},"description":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"line_items.items.[INDEX].item.description.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"line_items.items.[INDEX].item.description.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].item.description","typeLabel":"string | null"},"product_code":{"oneOf":[{"type":"string","description":"The seller's article number.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].item.product_code.oneOf.0","typeLabel":"string"},{"type":"null","description":"The seller's article number.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].item.product_code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].item.product_code","typeLabel":"string | null"},"buyer_product_code":{"oneOf":[{"type":"string","description":"The buyer's own article number.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].item.buyer_product_code.oneOf.0","typeLabel":"string"},{"type":"null","description":"The buyer's own article number.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].item.buyer_product_code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].item.buyer_product_code","typeLabel":"string | null"}},"required":["name","description","product_code","buyer_product_code"],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].item","typeLabel":"object"},"quantity":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$","isRequired":true,"uniqueKey":"line_items.items.[INDEX].quantity","typeLabel":"string"},"unit":{"oneOf":[{"type":"string","description":"As written, such as pcs or hours.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].unit.oneOf.0","typeLabel":"string"},{"type":"null","description":"As written, such as pcs or hours.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].unit.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].unit","typeLabel":"string | null"},"unit_price":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$","description":"The agreed net price per unit after the line's own discounts, excluding VAT. Zero or below on an allowance, zero or above on a charge.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].unit_price","typeLabel":"string"},"total_excluding_vat":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$","description":"quantity × unit_price.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].total_excluding_vat","typeLabel":"string"},"vat_rate":{"oneOf":[{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$","description":"The VAT rate the supplier is to charge, as a fraction: 0.25 is 25 %. Null when the order states none. A term: an invoice line billing the line at a higher rate is a vat_rate finding.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].vat_rate.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^-?\\d+(?:\\.\\d+)?$","description":"The VAT rate the supplier is to charge, as a fraction: 0.25 is 25 %. Null when the order states none. A term: an invoice line billing the line at a higher rate is a vat_rate finding.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].vat_rate.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].vat_rate","typeLabel":"string | null"},"kind":{"type":"string","enum":["item","allowance","charge"],"description":"Peppol: item for goods or services; allowance for a discount and charge for a fee, freight or surcharge the document lists on its own. Neither names the lines it applies to, and neither is spread over them.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].kind","typeLabel":"enum\u003cstring>"},"status":{"type":"string","enum":["active","cancelled"],"description":"A line removed from an opened order is cancelled; it keeps its ID and number.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"billed_amount":{"type":"string","uniqueKey":"line_items.items.[INDEX].billed_amount","typeLabel":"string"},"invoice_summary":{"oneOf":[{"type":"object","properties":{"invoices":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.invoices","typeLabel":"integer"},"unit_price_min":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.unit_price_min.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.unit_price_min.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.unit_price_min","typeLabel":"string | null"},"unit_price_max":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.unit_price_max.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.unit_price_max.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.unit_price_max","typeLabel":"string | null"},"unit_price_difference":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.unit_price_difference.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.unit_price_difference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.unit_price_difference","typeLabel":"string | null"},"price_difference_invoices":{"oneOf":[{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.price_difference_invoices.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":0,"isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.price_difference_invoices.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.price_difference_invoices","typeLabel":"integer | null"},"grouped_invoice_lines":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.grouped_invoice_lines.items.[INDEX].invoice_id","typeLabel":"string\u003cuuid>"},"invoice_number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.grouped_invoice_lines.items.[INDEX].invoice_number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.grouped_invoice_lines.items.[INDEX].invoice_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.grouped_invoice_lines.items.[INDEX].invoice_number","typeLabel":"string | null"},"invoice_item_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.grouped_invoice_lines.items.[INDEX].invoice_item_id","typeLabel":"string\u003cuuid>"},"line_number":{"type":"integer","isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.grouped_invoice_lines.items.[INDEX].line_number","typeLabel":"integer"},"description":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.grouped_invoice_lines.items.[INDEX].description.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.grouped_invoice_lines.items.[INDEX].description.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.grouped_invoice_lines.items.[INDEX].description","typeLabel":"string | null"},"purchase_order_line_ids":{"type":"array","items":{"type":"string","format":"uuid","uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.grouped_invoice_lines.items.[INDEX].purchase_order_line_ids.items.[INDEX]","typeLabel":"string\u003cuuid>"},"description":"Every order line the invoice line bills, this one included.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.grouped_invoice_lines.items.[INDEX].purchase_order_line_ids","typeLabel":"string\u003cuuid>[]"}},"required":["invoice_id","invoice_number","invoice_item_id","line_number","description","purchase_order_line_ids"],"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.grouped_invoice_lines.items.[INDEX]","typeLabel":"object"},"description":"Invoice lines that bill this line as part of a group, together with other lines of the order.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0.grouped_invoice_lines","typeLabel":"object[]"}},"required":["invoices","unit_price_min","unit_price_max","unit_price_difference","price_difference_invoices","grouped_invoice_lines"],"description":"Accepted invoices allocated to this line. Null if any invoice is restricted. Effective unit prices include line adjustments; a grouped invoice line counts what it bills this line. Null when units or quantities cannot be compared.","uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"invoices":{"type":"integer","minimum":0},"unit_price_min":{"oneOf":[{"type":"string"},{"type":"null"}]},"unit_price_max":{"oneOf":[{"type":"string"},{"type":"null"}]},"unit_price_difference":{"oneOf":[{"type":"string"},{"type":"null"}]},"price_difference_invoices":{"oneOf":[{"type":"integer","minimum":0},{"type":"null","minimum":0}]},"grouped_invoice_lines":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","format":"uuid"},"invoice_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"invoice_item_id":{"type":"string","format":"uuid"},"line_number":{"type":"integer"},"description":{"oneOf":[{"type":"string"},{"type":"null"}]},"purchase_order_line_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Every order line the invoice line bills, this one included."}},"required":["invoice_id","invoice_number","invoice_item_id","line_number","description","purchase_order_line_ids"]},"description":"Invoice lines that bill this line as part of a group, together with other lines of the order."}},"required":["invoices","unit_price_min","unit_price_max","unit_price_difference","price_difference_invoices","grouped_invoice_lines"],"description":"Accepted invoices allocated to this line. Null if any invoice is restricted. Effective unit prices include line adjustments; a grouped invoice line counts what it bills this line. Null when units or quantities cannot be compared.","uniqueKey":"line_items.items.[INDEX].invoice_summary.oneOf.1","typeLabel":"null"}],"uniqueKey":"line_items.items.[INDEX].invoice_summary","typeLabel":"object | null"},"invoice_check":{"oneOf":[{"type":"string","enum":["clean","findings","incomplete",null],"description":"The purchase-order check's verdict on the accepted invoices that bill this line: findings when an open quantity or unit price finding names the line; clean when every one was checked completely without one; incomplete otherwise. Null when no accepted invoice bills the line, the line is cancelled, or an invoice is restricted.","uniqueKey":"line_items.items.[INDEX].invoice_check.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["clean","findings","incomplete",null],"description":"The purchase-order check's verdict on the accepted invoices that bill this line: findings when an open quantity or unit price finding names the line; clean when every one was checked completely without one; incomplete otherwise. Null when no accepted invoice bills the line, the line is cancelled, or an invoice is restricted.","uniqueKey":"line_items.items.[INDEX].invoice_check.oneOf.1","typeLabel":"null"}],"uniqueKey":"line_items.items.[INDEX].invoice_check","typeLabel":"enum\u003cstring> | null"},"billed_quantity":{"oneOf":[{"type":"string","uniqueKey":"line_items.items.[INDEX].billed_quantity.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"line_items.items.[INDEX].billed_quantity.oneOf.1","typeLabel":"null"}],"uniqueKey":"line_items.items.[INDEX].billed_quantity","typeLabel":"string | null"},"quantity_complete":{"type":"boolean","uniqueKey":"line_items.items.[INDEX].quantity_complete","typeLabel":"boolean"},"billed_unit":{"oneOf":[{"type":"string","description":"The unit billed_quantity is in: the Peppol code, or the unit as written when it has none. A line without a unit takes the unit its billed invoice lines share.","uniqueKey":"line_items.items.[INDEX].billed_unit.oneOf.0","typeLabel":"string"},{"type":"null","description":"The unit billed_quantity is in: the Peppol code, or the unit as written when it has none. A line without a unit takes the unit its billed invoice lines share.","uniqueKey":"line_items.items.[INDEX].billed_unit.oneOf.1","typeLabel":"null"}],"uniqueKey":"line_items.items.[INDEX].billed_unit","typeLabel":"string | null"},"gross_unit_price":{"oneOf":[{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Peppol Price/AllowanceCharge/BaseAmount: the price per unit printed before the line's own discount, for display only; unit_price is the binding net price. Only on an item. Not part of the terms, so revisions leave it out.","uniqueKey":"line_items.items.[INDEX].gross_unit_price.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Peppol Price/AllowanceCharge/BaseAmount: the price per unit printed before the line's own discount, for display only; unit_price is the binding net price. Only on an item. Not part of the terms, so revisions leave it out.","uniqueKey":"line_items.items.[INDEX].gross_unit_price.oneOf.1","typeLabel":"null"}],"uniqueKey":"line_items.items.[INDEX].gross_unit_price","typeLabel":"string | null"},"agreement_item_id":{"oneOf":[{"type":"string","format":"uuid","description":"The agreement price the line was ordered from; null when it has none or you cannot see its agreement. Not part of the terms, so revisions leave it out.","uniqueKey":"line_items.items.[INDEX].agreement_item_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The agreement price the line was ordered from; null when it has none or you cannot see its agreement. Not part of the terms, so revisions leave it out.","uniqueKey":"line_items.items.[INDEX].agreement_item_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"line_items.items.[INDEX].agreement_item_id","typeLabel":"string\u003cuuid> | null"},"source_line_id":{"oneOf":[{"type":"string","description":"The line's ID in the order's other system (source): the ERP's on an imported or pushed order, the caller's on a linked one. Not part of the terms, so revisions leave it out.","uniqueKey":"line_items.items.[INDEX].source_line_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The line's ID in the order's other system (source): the ERP's on an imported or pushed order, the caller's on a linked one. Not part of the terms, so revisions leave it out.","uniqueKey":"line_items.items.[INDEX].source_line_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"line_items.items.[INDEX].source_line_id","typeLabel":"string | null"},"coding":{"oneOf":[{"type":"object","properties":{"account":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.account.oneOf.0.id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.account.oneOf.0.name","typeLabel":"string"},"usable":{"type":"boolean","description":"Active and still in the chart of accounts; a line keeps a code that went.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.account.oneOf.0.usable","typeLabel":"boolean"},"number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.account.oneOf.0.number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.account.oneOf.0.number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.account.oneOf.0.number","typeLabel":"string | null"}},"required":["id","name","usable","number"],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.account.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"usable":{"type":"boolean","description":"Active and still in the chart of accounts; a line keeps a code that went."},"number":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","usable","number"],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.account.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.account","typeLabel":"object | null"},"vat_code":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.vat_code.oneOf.0.id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.vat_code.oneOf.0.name","typeLabel":"string"},"usable":{"type":"boolean","description":"Active and still in the chart of accounts; a line keeps a code that went.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.vat_code.oneOf.0.usable","typeLabel":"boolean"},"code":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.vat_code.oneOf.0.code.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.vat_code.oneOf.0.code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.vat_code.oneOf.0.code","typeLabel":"string | null"},"rate":{"oneOf":[{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$","isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.vat_code.oneOf.0.rate.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^-?\\d+(?:\\.\\d+)?$","isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.vat_code.oneOf.0.rate.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.vat_code.oneOf.0.rate","typeLabel":"string | null"}},"required":["id","name","usable","code","rate"],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.vat_code.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"usable":{"type":"boolean","description":"Active and still in the chart of accounts; a line keeps a code that went."},"code":{"oneOf":[{"type":"string"},{"type":"null"}]},"rate":{"oneOf":[{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},{"type":"null","pattern":"^-?\\d+(?:\\.\\d+)?$"}]}},"required":["id","name","usable","code","rate"],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.vat_code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.vat_code","typeLabel":"object | null"},"dimension_values":{"type":"array","items":{"type":"object","properties":{"dimension_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.dimension_values.items.[INDEX].dimension_id","typeLabel":"string\u003cuuid>"},"dimension_name":{"type":"string","isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.dimension_values.items.[INDEX].dimension_name","typeLabel":"string"},"dimension_kind":{"type":"string","enum":["department","project","custom"],"description":"The dimension's kind: a project's value fills the order's project reference.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.dimension_values.items.[INDEX].dimension_kind","typeLabel":"enum\u003cstring>"},"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.dimension_values.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.dimension_values.items.[INDEX].name","typeLabel":"string"},"usable":{"type":"boolean","description":"Active and still in the chart of accounts; a line keeps a code that went.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.dimension_values.items.[INDEX].usable","typeLabel":"boolean"},"code":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.dimension_values.items.[INDEX].code.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.dimension_values.items.[INDEX].code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.dimension_values.items.[INDEX].code","typeLabel":"string | null"}},"required":["dimension_id","dimension_name","dimension_kind","id","name","usable","code"],"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.dimension_values.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"line_items.items.[INDEX].coding.oneOf.0.dimension_values","typeLabel":"object[]"}},"required":["account","vat_code","dimension_values"],"description":"Where the line's cost is booked; null when it is not coded. An invoice line matched to the order line takes it as its coding suggestion. Not part of the terms, so revisions leave it out.","uniqueKey":"line_items.items.[INDEX].coding.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"account":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"usable":{"type":"boolean","description":"Active and still in the chart of accounts; a line keeps a code that went."},"number":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","usable","number"]},{"type":"null","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"usable":{"type":"boolean","description":"Active and still in the chart of accounts; a line keeps a code that went."},"number":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","usable","number"]}]},"vat_code":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"usable":{"type":"boolean","description":"Active and still in the chart of accounts; a line keeps a code that went."},"code":{"oneOf":[{"type":"string"},{"type":"null"}]},"rate":{"oneOf":[{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},{"type":"null","pattern":"^-?\\d+(?:\\.\\d+)?$"}]}},"required":["id","name","usable","code","rate"]},{"type":"null","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"usable":{"type":"boolean","description":"Active and still in the chart of accounts; a line keeps a code that went."},"code":{"oneOf":[{"type":"string"},{"type":"null"}]},"rate":{"oneOf":[{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},{"type":"null","pattern":"^-?\\d+(?:\\.\\d+)?$"}]}},"required":["id","name","usable","code","rate"]}]},"dimension_values":{"type":"array","items":{"type":"object","properties":{"dimension_id":{"type":"string","format":"uuid"},"dimension_name":{"type":"string"},"dimension_kind":{"type":"string","enum":["department","project","custom"],"description":"The dimension's kind: a project's value fills the order's project reference."},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"usable":{"type":"boolean","description":"Active and still in the chart of accounts; a line keeps a code that went."},"code":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["dimension_id","dimension_name","dimension_kind","id","name","usable","code"]}}},"required":["account","vat_code","dimension_values"],"description":"Where the line's cost is booked; null when it is not coded. An invoice line matched to the order line takes it as its coding suggestion. Not part of the terms, so revisions leave it out.","uniqueKey":"line_items.items.[INDEX].coding.oneOf.1","typeLabel":"null"}],"uniqueKey":"line_items.items.[INDEX].coding","typeLabel":"object | null"},"received":{"oneOf":[{"type":"object","properties":{"quantity":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Everything received on the line, in `unit`.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].received.oneOf.0.quantity","typeLabel":"string"},"unit":{"oneOf":[{"type":"string","description":"The unit the quantity counts, as written: the line's when it was recorded, unless receiving gave another.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].received.oneOf.0.unit.oneOf.0","typeLabel":"string"},{"type":"null","description":"The unit the quantity counts, as written: the line's when it was recorded, unless receiving gave another.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].received.oneOf.0.unit.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"line_items.items.[INDEX].received.oneOf.0.unit","typeLabel":"string | null"},"last_received_on":{"type":"string","format":"date","description":"When the received quantity last changed.","isRequired":true,"uniqueKey":"line_items.items.[INDEX].received.oneOf.0.last_received_on","typeLabel":"string\u003cdate>"}},"required":["quantity","unit","last_received_on"],"description":"Goods received on the line (recordPurchaseOrderReceipts); null until a total is recorded. Invoices billing more than was received are flagged on orders that record goods received, while the received unit agrees with the line's.","uniqueKey":"line_items.items.[INDEX].received.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"quantity":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Everything received on the line, in `unit`."},"unit":{"oneOf":[{"type":"string","description":"The unit the quantity counts, as written: the line's when it was recorded, unless receiving gave another."},{"type":"null","description":"The unit the quantity counts, as written: the line's when it was recorded, unless receiving gave another."}]},"last_received_on":{"type":"string","format":"date","description":"When the received quantity last changed."}},"required":["quantity","unit","last_received_on"],"description":"Goods received on the line (recordPurchaseOrderReceipts); null until a total is recorded. Invoices billing more than was received are flagged on orders that record goods received, while the received unit agrees with the line's.","uniqueKey":"line_items.items.[INDEX].received.oneOf.1","typeLabel":"null"}],"uniqueKey":"line_items.items.[INDEX].received","typeLabel":"object | null"}},"required":["id","line_reference","item","quantity","unit","unit_price","total_excluding_vat","vat_rate","kind","status"],"uniqueKey":"line_items.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"line_items","typeLabel":"object[]"},"push_targets":{"type":"array","items":{"type":"object","properties":{"integration_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"push_targets.items.[INDEX].integration_id","typeLabel":"string\u003cuuid>"},"integration_name":{"type":"string","isRequired":true,"uniqueKey":"push_targets.items.[INDEX].integration_name","typeLabel":"string"},"system":{"type":"string","description":"The accounting system, such as tripletex.","isRequired":true,"uniqueKey":"push_targets.items.[INDEX].system","typeLabel":"string"}},"required":["integration_id","integration_name","system"],"uniqueKey":"push_targets.items.[INDEX]","typeLabel":"object"},"description":"Connections a native order can be pushed to; empty once the ERP holds it, and for imported orders.","isRequired":true,"uniqueKey":"push_targets","typeLabel":"object[]"},"latest_push":{"oneOf":[{"type":"object","properties":{"workflow_run_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"latest_push.oneOf.0.workflow_run_id","typeLabel":"string\u003cuuid>"},"integration_id":{"oneOf":[{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"latest_push.oneOf.0.integration_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","isRequired":true,"uniqueKey":"latest_push.oneOf.0.integration_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"latest_push.oneOf.0.integration_id","typeLabel":"string\u003cuuid> | null"},"integration_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"latest_push.oneOf.0.integration_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"latest_push.oneOf.0.integration_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"latest_push.oneOf.0.integration_name","typeLabel":"string | null"},"status":{"type":"string","enum":["queued","running","completed","completed_with_errors","failed","cancelled"],"isRequired":true,"uniqueKey":"latest_push.oneOf.0.status","typeLabel":"enum\u003cstring>"},"failure":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"latest_push.oneOf.0.failure.oneOf.0.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"latest_push.oneOf.0.failure.oneOf.0.message","typeLabel":"string"},"overwritable":{"type":"boolean","description":"Someone changed or deleted the order in the accounting system: pushing again with `overwrite` replaces their changes.","isRequired":true,"uniqueKey":"latest_push.oneOf.0.failure.oneOf.0.overwritable","typeLabel":"boolean"}},"required":["code","message","overwritable"],"isRequired":true,"uniqueKey":"latest_push.oneOf.0.failure.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"code":{"type":"string"},"message":{"type":"string"},"overwritable":{"type":"boolean","description":"Someone changed or deleted the order in the accounting system: pushing again with `overwrite` replaces their changes."}},"required":["code","message","overwritable"],"isRequired":true,"uniqueKey":"latest_push.oneOf.0.failure.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"latest_push.oneOf.0.failure","typeLabel":"object | null"}},"required":["workflow_run_id","integration_id","integration_name","status","failure"],"description":"The latest push of the order.","isRequired":true,"uniqueKey":"latest_push.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"workflow_run_id":{"type":"string","format":"uuid"},"integration_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"integration_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["queued","running","completed","completed_with_errors","failed","cancelled"]},"failure":{"oneOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"overwritable":{"type":"boolean","description":"Someone changed or deleted the order in the accounting system: pushing again with `overwrite` replaces their changes."}},"required":["code","message","overwritable"]},{"type":"null","properties":{"code":{"type":"string"},"message":{"type":"string"},"overwritable":{"type":"boolean","description":"Someone changed or deleted the order in the accounting system: pushing again with `overwrite` replaces their changes."}},"required":["code","message","overwritable"]}]}},"required":["workflow_run_id","integration_id","integration_name","status","failure"],"description":"The latest push of the order.","isRequired":true,"uniqueKey":"latest_push.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"latest_push","typeLabel":"object | null"},"push_readiness":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"push_readiness.items.[INDEX].code","typeLabel":"string"},"field":{"type":"string","isRequired":true,"uniqueKey":"push_readiness.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"push_readiness.items.[INDEX].message","typeLabel":"string"}},"required":["code","field","message"],"uniqueKey":"push_readiness.items.[INDEX]","typeLabel":"object"},"description":"What the order is missing before it can be pushed; empty when it is ready.","isRequired":true,"uniqueKey":"push_readiness","typeLabel":"object[]"},"to_fill":{"type":"array","items":{"oneOf":[{"type":"object","required":["field","message","dimension_id","dimension_name"],"properties":{"field":{"type":"string","enum":["dimension"],"isRequired":true,"uniqueKey":"to_fill.items.[INDEX].oneOf.0.field","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"to_fill.items.[INDEX].oneOf.0.message","typeLabel":"string"},"dimension_id":{"type":"string","format":"uuid","description":"List its values with listDimensionValues dimension_ids.","isRequired":true,"uniqueKey":"to_fill.items.[INDEX].oneOf.0.dimension_id","typeLabel":"string\u003cuuid>"},"dimension_name":{"type":"string","isRequired":true,"uniqueKey":"to_fill.items.[INDEX].oneOf.0.dimension_name","typeLabel":"string"}},"uniqueKey":"to_fill.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","required":["field","message","suggestions"],"properties":{"field":{"type":"string","enum":["agreement"],"isRequired":true,"uniqueKey":"to_fill.items.[INDEX].oneOf.1.field","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"to_fill.items.[INDEX].oneOf.1.message","typeLabel":"string"},"suggestions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"to_fill.items.[INDEX].oneOf.1.suggestions.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"title":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"to_fill.items.[INDEX].oneOf.1.suggestions.items.[INDEX].title.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"to_fill.items.[INDEX].oneOf.1.suggestions.items.[INDEX].title.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"to_fill.items.[INDEX].oneOf.1.suggestions.items.[INDEX].title","typeLabel":"string | null"},"reason":{"type":"string","enum":["contract_reference","parties_and_term"],"description":"contract_reference: the agreement names the order's contract reference. parties_and_term: it names the supplier and buyer, and its term covers the order's dates.","isRequired":true,"uniqueKey":"to_fill.items.[INDEX].oneOf.1.suggestions.items.[INDEX].reason","typeLabel":"enum\u003cstring>"}},"required":["id","title","reason"],"uniqueKey":"to_fill.items.[INDEX].oneOf.1.suggestions.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"to_fill.items.[INDEX].oneOf.1.suggestions","typeLabel":"object[]"}},"uniqueKey":"to_fill.items.[INDEX].oneOf.1","typeLabel":"object"}],"uniqueKey":"to_fill.items.[INDEX]","typeLabel":"object"},"description":"What an order made in Watchdog should still get: each dimension the organization requires that a draft does not carry yet (opening needs it), then the agreements that may cover it, while it links none. Fill each, or ask the person. Empty when nothing is missing, and for orders synced from an accounting system.","isRequired":true,"uniqueKey":"to_fill","typeLabel":"object[]"},"sent_to_supplier":{"oneOf":[{"type":"object","properties":{"channel":{"type":"string","enum":["email"],"description":"How it was sent.","isRequired":true,"uniqueKey":"sent_to_supplier.oneOf.0.channel","typeLabel":"enum\u003cstring>"},"revision":{"type":"integer","description":"The latest revision sent to the supplier.","isRequired":true,"uniqueKey":"sent_to_supplier.oneOf.0.revision","typeLabel":"integer"},"sent_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"sent_to_supplier.oneOf.0.sent_at","typeLabel":"string\u003cdate-time>"},"pending":{"type":"boolean","description":"The order changed since the supplier last got its terms: its revision is newer than supplier_revision.","isRequired":true,"uniqueKey":"sent_to_supplier.oneOf.0.pending","typeLabel":"boolean"}},"required":["channel","revision","sent_at","pending"],"description":"The latest revision sent to the supplier through Watchdog (sendPurchaseOrder), counting sends that went out or may have (accepted or unconfirmed emails); null when none went out.","isRequired":true,"uniqueKey":"sent_to_supplier.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"channel":{"type":"string","enum":["email"],"description":"How it was sent."},"revision":{"type":"integer","description":"The latest revision sent to the supplier."},"sent_at":{"type":"string","format":"date-time"},"pending":{"type":"boolean","description":"The order changed since the supplier last got its terms: its revision is newer than supplier_revision."}},"required":["channel","revision","sent_at","pending"],"description":"The latest revision sent to the supplier through Watchdog (sendPurchaseOrder), counting sends that went out or may have (accepted or unconfirmed emails); null when none went out.","isRequired":true,"uniqueKey":"sent_to_supplier.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sent_to_supplier","typeLabel":"object | null"},"supplier_revision":{"oneOf":[{"type":"integer","description":"The latest revision whose terms the supplier has, or may have: sent through Watchdog or marked as sent outside it (sendPurchaseOrder), made by accepting the supplier's own proposal, or revision 1 of an order they confirmed before it opened. Null when they have none.","isRequired":true,"uniqueKey":"supplier_revision.oneOf.0","typeLabel":"integer"},{"type":"null","description":"The latest revision whose terms the supplier has, or may have: sent through Watchdog or marked as sent outside it (sendPurchaseOrder), made by accepting the supplier's own proposal, or revision 1 of an order they confirmed before it opened. Null when they have none.","isRequired":true,"uniqueKey":"supplier_revision.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"supplier_revision","typeLabel":"integer | null"},"placement":{"type":"string","enum":["watchdog","external"],"description":"watchdog: placed through Watchdog, with its approval and send. external: ordered outside Watchdog (a web shop, the phone) and recorded here; it needed no order approval and is not sent.","isRequired":true,"uniqueKey":"placement","typeLabel":"enum\u003cstring>"},"approval":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The approval request. Send it as approval.request_id to approve or reject it; it changes when the request is withdrawn and asked again.","isRequired":true,"uniqueKey":"approval.oneOf.0.id","typeLabel":"string\u003cuuid>"},"status":{"type":"string","enum":["pending","approved","rejected"],"description":"pending until one of the approvers approves or rejects it.","isRequired":true,"uniqueKey":"approval.oneOf.0.status","typeLabel":"enum\u003cstring>"},"sent":{"type":"boolean","description":"Whether its approvers were asked. False while it only holds the approvers picked on a draft: opening the draft (status open) sends it. Only a sent request waits for approval or can be decided.","isRequired":true,"uniqueKey":"approval.oneOf.0.sent","typeLabel":"boolean"},"revision":{"type":"integer","description":"The revision it decides: 1 for a draft, which opens once approved, or the revision a proposed change would make.","isRequired":true,"uniqueKey":"approval.oneOf.0.revision","typeLabel":"integer"},"proposal_id":{"oneOf":[{"type":"string","format":"uuid","description":"The proposed revision it decides (proposed_revision.id); null for a draft. Approving applies it, rejecting discards it, and the order's current revision stays in force meanwhile.","isRequired":true,"uniqueKey":"approval.oneOf.0.proposal_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The proposed revision it decides (proposed_revision.id); null for a draft. Approving applies it, rejecting discards it, and the order's current revision stays in force meanwhile.","isRequired":true,"uniqueKey":"approval.oneOf.0.proposal_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.proposal_id","typeLabel":"string\u003cuuid> | null"},"approvers":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$","isRequired":true,"uniqueKey":"approval.oneOf.0.approvers.items.[INDEX].user_id","typeLabel":"string"},"first_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approval.oneOf.0.approvers.items.[INDEX].first_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approval.oneOf.0.approvers.items.[INDEX].first_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.approvers.items.[INDEX].first_name","typeLabel":"string | null"},"last_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approval.oneOf.0.approvers.items.[INDEX].last_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approval.oneOf.0.approvers.items.[INDEX].last_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.approvers.items.[INDEX].last_name","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approval.oneOf.0.approvers.items.[INDEX].email.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approval.oneOf.0.approvers.items.[INDEX].email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.approvers.items.[INDEX].email","typeLabel":"string | null"},"source":{"type":"string","enum":["person","rule"],"description":"`person`: added by hand. `rule`: added by an approval rule.","isRequired":true,"uniqueKey":"approval.oneOf.0.approvers.items.[INDEX].source","typeLabel":"enum\u003cstring>"},"decision":{"oneOf":[{"type":"string","enum":["approved","rejected",null],"isRequired":true,"uniqueKey":"approval.oneOf.0.approvers.items.[INDEX].decision.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["approved","rejected",null],"isRequired":true,"uniqueKey":"approval.oneOf.0.approvers.items.[INDEX].decision.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.approvers.items.[INDEX].decision","typeLabel":"enum\u003cstring> | null"}},"required":["user_id","first_name","last_name","email","source","decision"],"uniqueKey":"approval.oneOf.0.approvers.items.[INDEX]","typeLabel":"object"},"description":"In the order they were added. Any one of them decides. Empty while pending means no one can approve the order yet: add someone with updatePurchaseOrderApprovers.","isRequired":true,"uniqueKey":"approval.oneOf.0.approvers","typeLabel":"object[]"},"approver_teams":{"type":"array","items":{"type":"object","properties":{"team_id":{"oneOf":[{"type":"string","format":"uuid","description":"Null when the team has been deleted since.","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].team_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"Null when the team has been deleted since.","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].team_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].team_id","typeLabel":"string\u003cuuid> | null"},"name":{"oneOf":[{"type":"string","description":"Null when the team has been deleted since.","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Null when the team has been deleted since.","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].name","typeLabel":"string | null"},"source":{"type":"string","enum":["person","rule"],"description":"`person`: added by hand. `rule`: added by an approval rule.","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].source","typeLabel":"enum\u003cstring>"},"decision":{"oneOf":[{"type":"string","enum":["approved","rejected",null],"isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].decision.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["approved","rejected",null],"isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].decision.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].decision","typeLabel":"enum\u003cstring> | null"},"decided_by":{"oneOf":[{"type":"object","properties":{"user_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].decided_by.oneOf.0.user_id","typeLabel":"string"},"first_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].decided_by.oneOf.0.first_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].decided_by.oneOf.0.first_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].decided_by.oneOf.0.first_name","typeLabel":"string | null"},"last_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].decided_by.oneOf.0.last_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].decided_by.oneOf.0.last_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].decided_by.oneOf.0.last_name","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].decided_by.oneOf.0.email.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].decided_by.oneOf.0.email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].decided_by.oneOf.0.email","typeLabel":"string | null"}},"required":["user_id","first_name","last_name","email"],"description":"Who decided for the team; null until someone has.","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].decided_by.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"user_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"},"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":"Who decided for the team; null until someone has.","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].decided_by.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].decided_by","typeLabel":"object | null"},"nobody_can_act":{"type":"boolean","description":"Nobody in the team can approve the order now: no member has write access and can see it. Add someone to the team, or add another approver. False once the team has decided or the request is not pending.","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].nobody_can_act","typeLabel":"boolean"},"members":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].members.items.[INDEX].user_id","typeLabel":"string"},"first_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].members.items.[INDEX].first_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].members.items.[INDEX].first_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].members.items.[INDEX].first_name","typeLabel":"string | null"},"last_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].members.items.[INDEX].last_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].members.items.[INDEX].last_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].members.items.[INDEX].last_name","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].members.items.[INDEX].email.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].members.items.[INDEX].email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].members.items.[INDEX].email","typeLabel":"string | null"}},"required":["user_id","first_name","last_name","email"],"uniqueKey":"approval.oneOf.0.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 order may decide for it.","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX].members","typeLabel":"object[]"}},"required":["team_id","name","source","decision","decided_by","nobody_can_act","members"],"uniqueKey":"approval.oneOf.0.approver_teams.items.[INDEX]","typeLabel":"object"},"description":"Teams asked to approve, in the order they were added; each counts as one approver.","isRequired":true,"uniqueKey":"approval.oneOf.0.approver_teams","typeLabel":"object[]"},"skipped_approvers":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$","isRequired":true,"uniqueKey":"approval.oneOf.0.skipped_approvers.items.[INDEX].user_id","typeLabel":"string"},"first_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approval.oneOf.0.skipped_approvers.items.[INDEX].first_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approval.oneOf.0.skipped_approvers.items.[INDEX].first_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.skipped_approvers.items.[INDEX].first_name","typeLabel":"string | null"},"last_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approval.oneOf.0.skipped_approvers.items.[INDEX].last_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approval.oneOf.0.skipped_approvers.items.[INDEX].last_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.skipped_approvers.items.[INDEX].last_name","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"approval.oneOf.0.skipped_approvers.items.[INDEX].email.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"approval.oneOf.0.skipped_approvers.items.[INDEX].email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.skipped_approvers.items.[INDEX].email","typeLabel":"string | null"},"reason":{"type":"string","enum":["no_access","no_write","removed_by_hand"],"description":"`no_access`: their access limits hide the order. `no_write`: role without write access. `removed_by_hand`: a person removed them.","isRequired":true,"uniqueKey":"approval.oneOf.0.skipped_approvers.items.[INDEX].reason","typeLabel":"enum\u003cstring>"}},"required":["user_id","first_name","last_name","email","reason"],"uniqueKey":"approval.oneOf.0.skipped_approvers.items.[INDEX]","typeLabel":"object"},"description":"People an approval rule names but did not add, while the request is pending.","isRequired":true,"uniqueKey":"approval.oneOf.0.skipped_approvers","typeLabel":"object[]"},"skipped_teams":{"type":"array","items":{"type":"object","properties":{"team_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"approval.oneOf.0.skipped_teams.items.[INDEX].team_id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","isRequired":true,"uniqueKey":"approval.oneOf.0.skipped_teams.items.[INDEX].name","typeLabel":"string"}},"required":["team_id","name"],"uniqueKey":"approval.oneOf.0.skipped_teams.items.[INDEX]","typeLabel":"object"},"description":"Teams an approval rule names but did not add because nobody in them could approve the order, while the request is pending.","isRequired":true,"uniqueKey":"approval.oneOf.0.skipped_teams","typeLabel":"object[]"},"requested_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"approval.oneOf.0.requested_at","typeLabel":"string\u003cdate-time>"},"decided_at":{"oneOf":[{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"approval.oneOf.0.decided_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","isRequired":true,"uniqueKey":"approval.oneOf.0.decided_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.decided_at","typeLabel":"string\u003cdate-time> | null"},"decided_by":{"oneOf":[{"type":"object","properties":{"user_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$","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"],"isRequired":true,"uniqueKey":"approval.oneOf.0.decided_by.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"user_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"},"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"],"isRequired":true,"uniqueKey":"approval.oneOf.0.decided_by.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.decided_by","typeLabel":"object | null"},"rejection_reason":{"oneOf":[{"type":"string","description":"Why the order was rejected; null when no reason was given.","isRequired":true,"uniqueKey":"approval.oneOf.0.rejection_reason.oneOf.0","typeLabel":"string"},{"type":"null","description":"Why the order was rejected; null when no reason was given.","isRequired":true,"uniqueKey":"approval.oneOf.0.rejection_reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval.oneOf.0.rejection_reason","typeLabel":"string | null"}},"required":["id","status","sent","revision","proposal_id","approvers","approver_teams","skipped_approvers","skipped_teams","requested_at","decided_at","decided_by","rejection_reason"],"description":"The order's approval request. A draft's latest: pending, or its decision. Past a draft, the one deciding a proposed revision while one waits, else the one that approved the terms in force. Null when it needed none (opened without approval, or imported), or a draft's request was withdrawn.","isRequired":true,"uniqueKey":"approval.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"id":{"type":"string","format":"uuid","description":"The approval request. Send it as approval.request_id to approve or reject it; it changes when the request is withdrawn and asked again."},"status":{"type":"string","enum":["pending","approved","rejected"],"description":"pending until one of the approvers approves or rejects it."},"sent":{"type":"boolean","description":"Whether its approvers were asked. False while it only holds the approvers picked on a draft: opening the draft (status open) sends it. Only a sent request waits for approval or can be decided."},"revision":{"type":"integer","description":"The revision it decides: 1 for a draft, which opens once approved, or the revision a proposed change would make."},"proposal_id":{"oneOf":[{"type":"string","format":"uuid","description":"The proposed revision it decides (proposed_revision.id); null for a draft. Approving applies it, rejecting discards it, and the order's current revision stays in force meanwhile."},{"type":"null","format":"uuid","description":"The proposed revision it decides (proposed_revision.id); null for a draft. Approving applies it, rejecting discards it, and the order's current revision stays in force meanwhile."}]},"approvers":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"},"first_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"email":{"oneOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","enum":["person","rule"],"description":"`person`: added by hand. `rule`: added by an approval rule."},"decision":{"oneOf":[{"type":"string","enum":["approved","rejected",null]},{"type":"null","enum":["approved","rejected",null]}]}},"required":["user_id","first_name","last_name","email","source","decision"]},"description":"In the order they were added. Any one of them decides. Empty while pending means no one can approve the order yet: add someone with updatePurchaseOrderApprovers."},"approver_teams":{"type":"array","items":{"type":"object","properties":{"team_id":{"oneOf":[{"type":"string","format":"uuid","description":"Null when the team has been deleted since."},{"type":"null","format":"uuid","description":"Null when the team has been deleted since."}]},"name":{"oneOf":[{"type":"string","description":"Null when the team has been deleted since."},{"type":"null","description":"Null when the team has been deleted since."}]},"source":{"type":"string","enum":["person","rule"],"description":"`person`: added by hand. `rule`: added by an approval rule."},"decision":{"oneOf":[{"type":"string","enum":["approved","rejected",null]},{"type":"null","enum":["approved","rejected",null]}]},"decided_by":{"oneOf":[{"type":"object","properties":{"user_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"},"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":"Who decided for the team; null until someone has."},{"type":"null","properties":{"user_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"},"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":"Who decided for the team; null until someone has."}]},"nobody_can_act":{"type":"boolean","description":"Nobody in the team can approve the order now: no member has write access and can see it. Add someone to the team, or add another approver. False once the team has decided or the request is not pending."},"members":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"},"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":"Who is in the team now: any of them with write access who can see the order may decide for it."}},"required":["team_id","name","source","decision","decided_by","nobody_can_act","members"]},"description":"Teams asked to approve, in the order they were added; each counts as one approver."},"skipped_approvers":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"},"first_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"email":{"oneOf":[{"type":"string"},{"type":"null"}]},"reason":{"type":"string","enum":["no_access","no_write","removed_by_hand"],"description":"`no_access`: their access limits hide the order. `no_write`: role without write access. `removed_by_hand`: a person removed them."}},"required":["user_id","first_name","last_name","email","reason"]},"description":"People an approval rule names but did not add, while the request is pending."},"skipped_teams":{"type":"array","items":{"type":"object","properties":{"team_id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["team_id","name"]},"description":"Teams an approval rule names but did not add because nobody in them could approve the order, while the request is pending."},"requested_at":{"type":"string","format":"date-time"},"decided_at":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null","format":"date-time"}]},"decided_by":{"oneOf":[{"type":"object","properties":{"user_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"},"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"]},{"type":"null","properties":{"user_id":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"},"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"]}]},"rejection_reason":{"oneOf":[{"type":"string","description":"Why the order was rejected; null when no reason was given."},{"type":"null","description":"Why the order was rejected; null when no reason was given."}]}},"required":["id","status","sent","revision","proposal_id","approvers","approver_teams","skipped_approvers","skipped_teams","requested_at","decided_at","decided_by","rejection_reason"],"description":"The order's approval request. A draft's latest: pending, or its decision. Past a draft, the one deciding a proposed revision while one waits, else the one that approved the terms in force. Null when it needed none (opened without approval, or imported), or a draft's request was withdrawn.","isRequired":true,"uniqueKey":"approval.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"approval","typeLabel":"object | null"},"approval_required":{"type":"boolean","description":"A draft that an approval rule for orders matches: opening it asks for approval instead. False for opened and imported orders.","isRequired":true,"uniqueKey":"approval_required","typeLabel":"boolean"},"opened_at":{"oneOf":[{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"opened_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","isRequired":true,"uniqueKey":"opened_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"opened_at","typeLabel":"string\u003cdate-time> | null"},"closed_at":{"oneOf":[{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"closed_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","isRequired":true,"uniqueKey":"closed_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"closed_at","typeLabel":"string\u003cdate-time> | null"},"cancelled_at":{"oneOf":[{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"cancelled_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","isRequired":true,"uniqueKey":"cancelled_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"cancelled_at","typeLabel":"string\u003cdate-time> | null"},"archived_at":{"oneOf":[{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"archived_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","isRequired":true,"uniqueKey":"archived_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"archived_at","typeLabel":"string\u003cdate-time> | null"},"import":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"import.oneOf.0.id","typeLabel":"string\u003cuuid>"},"intent":{"oneOf":[{"type":"string","enum":["new","placed",null],"isRequired":true,"uniqueKey":"import.oneOf.0.intent.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["new","placed",null],"isRequired":true,"uniqueKey":"import.oneOf.0.intent.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"import.oneOf.0.intent","typeLabel":"enum\u003cstring> | null"},"missing":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["supplier","buyer","currency","lines","quantity","unit_price","price_basis","total","delivery_date","delivery","other","sources"],"description":"What the draft still needs. supplier, buyer, currency and lines follow the order as it is now, as does unit_price: a line whose price the documents left out and that is still zero. The others are notes from reading the documents, shown while the order is a draft: quantity, price_basis (VAT), total (the lines differ from the printed total by more than 1), delivery_date, delivery, sources (files not read in full: past the reading limit, too large, an email that cannot be parsed, an attachment left out, or text read in part as \"name (read / total characters)\"; named in note) and other.","isRequired":true,"uniqueKey":"import.oneOf.0.missing.items.[INDEX].field","typeLabel":"enum\u003cstring>"},"line_id":{"oneOf":[{"type":"string","format":"uuid","description":"The line it concerns; null for the order.","isRequired":true,"uniqueKey":"import.oneOf.0.missing.items.[INDEX].line_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The line it concerns; null for the order.","isRequired":true,"uniqueKey":"import.oneOf.0.missing.items.[INDEX].line_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"import.oneOf.0.missing.items.[INDEX].line_id","typeLabel":"string\u003cuuid> | null"},"note":{"oneOf":[{"type":"string","description":"What the documents showed, in the organization language; null when the field says it all.","isRequired":true,"uniqueKey":"import.oneOf.0.missing.items.[INDEX].note.oneOf.0","typeLabel":"string"},{"type":"null","description":"What the documents showed, in the organization language; null when the field says it all.","isRequired":true,"uniqueKey":"import.oneOf.0.missing.items.[INDEX].note.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"import.oneOf.0.missing.items.[INDEX].note","typeLabel":"string | null"}},"required":["field","line_id","note"],"uniqueKey":"import.oneOf.0.missing.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"import.oneOf.0.missing","typeLabel":"object[]"},"printed":{"type":"object","properties":{"supplier":{"oneOf":[{"type":"object","properties":{"name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"import.oneOf.0.printed.supplier.oneOf.0.name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"import.oneOf.0.printed.supplier.oneOf.0.name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"import.oneOf.0.printed.supplier.oneOf.0.name","typeLabel":"string | null"},"organization_number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"import.oneOf.0.printed.supplier.oneOf.0.organization_number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"import.oneOf.0.printed.supplier.oneOf.0.organization_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"import.oneOf.0.printed.supplier.oneOf.0.organization_number","typeLabel":"string | null"},"vat_number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"import.oneOf.0.printed.supplier.oneOf.0.vat_number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"import.oneOf.0.printed.supplier.oneOf.0.vat_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"import.oneOf.0.printed.supplier.oneOf.0.vat_number","typeLabel":"string | null"}},"required":["name","organization_number","vat_number"],"isRequired":true,"uniqueKey":"import.oneOf.0.printed.supplier.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"organization_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"vat_number":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["name","organization_number","vat_number"],"isRequired":true,"uniqueKey":"import.oneOf.0.printed.supplier.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"import.oneOf.0.printed.supplier","typeLabel":"object | null"},"buyer":{"oneOf":[{"type":"object","properties":{"name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"import.oneOf.0.printed.buyer.oneOf.0.name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"import.oneOf.0.printed.buyer.oneOf.0.name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"import.oneOf.0.printed.buyer.oneOf.0.name","typeLabel":"string | null"},"organization_number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"import.oneOf.0.printed.buyer.oneOf.0.organization_number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"import.oneOf.0.printed.buyer.oneOf.0.organization_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"import.oneOf.0.printed.buyer.oneOf.0.organization_number","typeLabel":"string | null"},"vat_number":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"import.oneOf.0.printed.buyer.oneOf.0.vat_number.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"import.oneOf.0.printed.buyer.oneOf.0.vat_number.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"import.oneOf.0.printed.buyer.oneOf.0.vat_number","typeLabel":"string | null"}},"required":["name","organization_number","vat_number"],"isRequired":true,"uniqueKey":"import.oneOf.0.printed.buyer.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"organization_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"vat_number":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["name","organization_number","vat_number"],"isRequired":true,"uniqueKey":"import.oneOf.0.printed.buyer.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"import.oneOf.0.printed.buyer","typeLabel":"object | null"}},"required":["supplier","buyer"],"description":"The supplier and buyer as the documents print them, to choose the right party on a draft. Null where the documents name none.","isRequired":true,"uniqueKey":"import.oneOf.0.printed","typeLabel":"object"}},"required":["id","intent","missing","printed"],"description":"The import that drafted the order from documents: what they show (intent), what the draft still needs (missing) and the parties as printed. Null for an order created otherwise.","isRequired":true,"uniqueKey":"import.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"id":{"type":"string","format":"uuid"},"intent":{"oneOf":[{"type":"string","enum":["new","placed",null]},{"type":"null","enum":["new","placed",null]}]},"missing":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["supplier","buyer","currency","lines","quantity","unit_price","price_basis","total","delivery_date","delivery","other","sources"],"description":"What the draft still needs. supplier, buyer, currency and lines follow the order as it is now, as does unit_price: a line whose price the documents left out and that is still zero. The others are notes from reading the documents, shown while the order is a draft: quantity, price_basis (VAT), total (the lines differ from the printed total by more than 1), delivery_date, delivery, sources (files not read in full: past the reading limit, too large, an email that cannot be parsed, an attachment left out, or text read in part as \"name (read / total characters)\"; named in note) and other."},"line_id":{"oneOf":[{"type":"string","format":"uuid","description":"The line it concerns; null for the order."},{"type":"null","format":"uuid","description":"The line it concerns; null for the order."}]},"note":{"oneOf":[{"type":"string","description":"What the documents showed, in the organization language; null when the field says it all."},{"type":"null","description":"What the documents showed, in the organization language; null when the field says it all."}]}},"required":["field","line_id","note"]}},"printed":{"type":"object","properties":{"supplier":{"oneOf":[{"type":"object","properties":{"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"organization_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"vat_number":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["name","organization_number","vat_number"]},{"type":"null","properties":{"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"organization_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"vat_number":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["name","organization_number","vat_number"]}]},"buyer":{"oneOf":[{"type":"object","properties":{"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"organization_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"vat_number":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["name","organization_number","vat_number"]},{"type":"null","properties":{"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"organization_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"vat_number":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["name","organization_number","vat_number"]}]}},"required":["supplier","buyer"],"description":"The supplier and buyer as the documents print them, to choose the right party on a draft. Null where the documents name none."}},"required":["id","intent","missing","printed"],"description":"The import that drafted the order from documents: what they show (intent), what the draft still needs (missing) and the parties as printed. Null for an order created otherwise.","isRequired":true,"uniqueKey":"import.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"import","typeLabel":"object | null"},"proposed_revision":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Send it as proposed_revision.id to accept or reject the proposed revision.","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.id","typeLabel":"string\u003cuuid>"},"revision":{"oneOf":[{"type":"integer","description":"The revision it makes once accepted; null on a draft, whose supplier's reply proposes its lines.","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.revision.oneOf.0","typeLabel":"integer"},{"type":"null","description":"The revision it makes once accepted; null on a draft, whose supplier's reply proposes its lines.","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.revision.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.revision","typeLabel":"integer | null"},"source":{"type":"string","enum":["member","supplier"],"description":"`member`: an edit that needs approval. `supplier`: read from a supplier's confirmation.","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.source","typeLabel":"enum\u003cstring>"},"decided_by":{"type":"string","enum":["approvers","members"],"description":"`approvers`: it needs approval, so the order's approval request decides it (approve or reject through approval). `members`: any member accepts or rejects it.","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.decided_by","typeLabel":"enum\u003cstring>"},"prices_without_vat_basis":{"type":"boolean","description":"The supplier's document stated no VAT basis, so its prices were read as excluding VAT. Check them before accepting.","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.prices_without_vat_basis","typeLabel":"boolean"},"supplier_has_after_accept":{"type":"boolean","description":"Accepting it leaves the supplier with the revision it makes: their own change to terms they had. Otherwise the order is sent to them afterwards.","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.supplier_has_after_accept","typeLabel":"boolean"},"proposed_by":{"oneOf":[{"type":"object","properties":{"user_id":{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.proposed_by.oneOf.0.user_id","typeLabel":"string"},"first_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.proposed_by.oneOf.0.first_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.proposed_by.oneOf.0.first_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.proposed_by.oneOf.0.first_name","typeLabel":"string | null"},"last_name":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.proposed_by.oneOf.0.last_name.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.proposed_by.oneOf.0.last_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.proposed_by.oneOf.0.last_name","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.proposed_by.oneOf.0.email.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.proposed_by.oneOf.0.email.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.proposed_by.oneOf.0.email","typeLabel":"string | null"}},"required":["user_id","first_name","last_name","email"],"description":"The person who proposed it; null for a confirmation read without one.","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.proposed_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":"The person who proposed it; null for a confirmation read without one.","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.proposed_by.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.proposed_by","typeLabel":"object | null"},"document_ids":{"type":"array","items":{"type":"string","format":"uuid","uniqueKey":"proposed_revision.oneOf.0.document_ids.items.[INDEX]","typeLabel":"string\u003cuuid>"},"description":"The order's documents it was read from, attachments first.","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.document_ids","typeLabel":"string\u003cuuid>[]"},"changes":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].field","typeLabel":"string"},"from":{"oneOf":[{"type":"string","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].from.oneOf.0","typeLabel":"string"},{"type":"number","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].from.oneOf.1","typeLabel":"number"},{"type":"boolean","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].from.oneOf.2","typeLabel":"boolean"},{"type":"null","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].from.oneOf.3","typeLabel":"null"},{"type":"array","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].from.oneOf.4","typeLabel":"array"},{"type":"object","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].from.oneOf.5","typeLabel":"object"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].from","typeLabel":"string | number | boolean | null | array | object"},"to":{"oneOf":[{"type":"string","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].to.oneOf.0","typeLabel":"string"},{"type":"number","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].to.oneOf.1","typeLabel":"number"},{"type":"boolean","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].to.oneOf.2","typeLabel":"boolean"},{"type":"null","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].to.oneOf.3","typeLabel":"null"},{"type":"array","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].to.oneOf.4","typeLabel":"array"},{"type":"object","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].to.oneOf.5","typeLabel":"object"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].to","typeLabel":"string | number | boolean | null | array | object"}},"required":["field","from","to"],"additionalProperties":{"oneOf":[{"type":"string","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].additionalProperties.oneOf.0","typeLabel":"string"},{"type":"number","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].additionalProperties.oneOf.1","typeLabel":"number"},{"type":"boolean","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].additionalProperties.oneOf.2","typeLabel":"boolean"},{"type":"null","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].additionalProperties.oneOf.3","typeLabel":"null"},{"type":"array","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].additionalProperties.oneOf.4","typeLabel":"array"},{"type":"object","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].additionalProperties.oneOf.5","typeLabel":"object"}],"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX].additionalProperties","typeLabel":"string | number | boolean | null | array | object"},"uniqueKey":"proposed_revision.oneOf.0.changes.items.[INDEX]","typeLabel":"object"},"description":"Each changed term (`field`, `from`, `to`) and each added, changed or cancelled line (`field` line_items with `line_id`), as the order activity shows changes. Empty when it can no longer be shown against the order.","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.changes","typeLabel":"object[]"},"currency_code":{"oneOf":[{"type":"string","description":"The currency it gives the order, which `totals` are in; the order's own unless it changes it.","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.currency_code.oneOf.0","typeLabel":"string"},{"type":"null","description":"The currency it gives the order, which `totals` are in; the order's own unless it changes it.","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.currency_code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.currency_code","typeLabel":"string | null"},"totals":{"type":"object","properties":{"lines_excluding_vat":{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.totals.lines_excluding_vat","typeLabel":"string"},"commitment":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.totals.commitment.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.totals.commitment.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.totals.commitment","typeLabel":"string | null"}},"required":["lines_excluding_vat","commitment"],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.totals","typeLabel":"object"},"agreement_check":{"oneOf":[{"type":"object","properties":{"findings":{"type":"array","items":{"oneOf":[{"type":"object","required":["code","target","applicable","line_key","fingerprint","evidence","current_unit_price","agreement_unit_price","quantity","amount_difference","unit_to_set"],"properties":{"code":{"type":"string","enum":["unit_price"],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.code","typeLabel":"enum\u003cstring>"},"target":{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.target","typeLabel":"string"},"applicable":{"type":"boolean","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.applicable","typeLabel":"boolean"},"line_key":{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.line_key","typeLabel":"string"},"fingerprint":{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.fingerprint","typeLabel":"string"},"evidence":{"type":"object","properties":{"agreement_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.evidence.agreement_id","typeLabel":"string\u003cuuid>"},"price_item_id":{"oneOf":[{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.evidence.price_item_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.evidence.price_item_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.evidence.price_item_id","typeLabel":"string\u003cuuid> | null"},"document_id":{"oneOf":[{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.evidence.document_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.evidence.document_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.evidence.document_id","typeLabel":"string\u003cuuid> | null"},"terms":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.evidence.terms.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.evidence.terms.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.evidence.terms","typeLabel":"string | null"}},"required":["agreement_id","price_item_id","document_id","terms"],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.evidence","typeLabel":"object"},"current_unit_price":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.current_unit_price","typeLabel":"string"},"agreement_unit_price":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.agreement_unit_price","typeLabel":"string"},"quantity":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.quantity","typeLabel":"string"},"amount_difference":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.amount_difference","typeLabel":"string"},"unit_to_set":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.unit_to_set.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.unit_to_set.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0.unit_to_set","typeLabel":"string | null"}},"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","required":["code","target","applicable","line_key","fingerprint","evidence","current_unit","agreement_unit","current_unit_price","agreement_unit_price"],"properties":{"code":{"type":"string","enum":["unit"],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.code","typeLabel":"enum\u003cstring>"},"target":{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.target","typeLabel":"string"},"applicable":{"type":"boolean","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.applicable","typeLabel":"boolean"},"line_key":{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.line_key","typeLabel":"string"},"fingerprint":{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.fingerprint","typeLabel":"string"},"evidence":{"type":"object","properties":{"agreement_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.evidence.agreement_id","typeLabel":"string\u003cuuid>"},"price_item_id":{"oneOf":[{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.evidence.price_item_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.evidence.price_item_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.evidence.price_item_id","typeLabel":"string\u003cuuid> | null"},"document_id":{"oneOf":[{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.evidence.document_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.evidence.document_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.evidence.document_id","typeLabel":"string\u003cuuid> | null"},"terms":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.evidence.terms.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.evidence.terms.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.evidence.terms","typeLabel":"string | null"}},"required":["agreement_id","price_item_id","document_id","terms"],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.evidence","typeLabel":"object"},"current_unit":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.current_unit.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.current_unit.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.current_unit","typeLabel":"string | null"},"agreement_unit":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.agreement_unit.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.agreement_unit.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.agreement_unit","typeLabel":"string | null"},"current_unit_price":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.current_unit_price","typeLabel":"string"},"agreement_unit_price":{"oneOf":[{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.agreement_unit_price.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^-?\\d+(?:\\.\\d+)?$","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.agreement_unit_price.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1.agreement_unit_price","typeLabel":"string | null"}},"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","required":["code","target","applicable","line_key","fingerprint"],"properties":{"code":{"type":"string","enum":["no_agreement_price"],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.2.code","typeLabel":"enum\u003cstring>"},"target":{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.2.target","typeLabel":"string"},"applicable":{"type":"boolean","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.2.applicable","typeLabel":"boolean"},"line_key":{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.2.line_key","typeLabel":"string"},"fingerprint":{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.2.fingerprint","typeLabel":"string"}},"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","required":["code","target","applicable","line_key","fingerprint","evidence","reason","price_item_ids"],"properties":{"code":{"type":"string","enum":["uncertain"],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.3.code","typeLabel":"enum\u003cstring>"},"target":{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.3.target","typeLabel":"string"},"applicable":{"type":"boolean","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.3.applicable","typeLabel":"boolean"},"line_key":{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.3.line_key","typeLabel":"string"},"fingerprint":{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.3.fingerprint","typeLabel":"string"},"evidence":{"type":"object","properties":{"agreement_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.3.evidence.agreement_id","typeLabel":"string\u003cuuid>"},"price_item_id":{"oneOf":[{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.3.evidence.price_item_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.3.evidence.price_item_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.3.evidence.price_item_id","typeLabel":"string\u003cuuid> | null"},"document_id":{"oneOf":[{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.3.evidence.document_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.3.evidence.document_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.3.evidence.document_id","typeLabel":"string\u003cuuid> | null"},"terms":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.3.evidence.terms.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.3.evidence.terms.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.3.evidence.terms","typeLabel":"string | null"}},"required":["agreement_id","price_item_id","document_id","terms"],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.3.evidence","typeLabel":"object"},"reason":{"type":"string","enum":["calculation_rules","rate_price","ambiguous_price","no_valid_price","currency_mismatch","no_order_currency"],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.3.reason","typeLabel":"enum\u003cstring>"},"price_item_ids":{"type":"array","items":{"type":"string","format":"uuid","uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.3.price_item_ids.items.[INDEX]","typeLabel":"string\u003cuuid>"},"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.3.price_item_ids","typeLabel":"string\u003cuuid>[]"}},"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.3","typeLabel":"object"},{"type":"object","required":["code","target","applicable","fingerprint","supplier_id"],"properties":{"code":{"type":"string","enum":["supplier"],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.4.code","typeLabel":"enum\u003cstring>"},"target":{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.4.target","typeLabel":"string"},"applicable":{"type":"boolean","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.4.applicable","typeLabel":"boolean"},"fingerprint":{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.4.fingerprint","typeLabel":"string"},"supplier_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.4.supplier_id","typeLabel":"string\u003cuuid>"}},"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.4","typeLabel":"object"},{"type":"object","required":["code","target","applicable","fingerprint","buyer_id"],"properties":{"code":{"type":"string","enum":["buyer"],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.5.code","typeLabel":"enum\u003cstring>"},"target":{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.5.target","typeLabel":"string"},"applicable":{"type":"boolean","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.5.applicable","typeLabel":"boolean"},"fingerprint":{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.5.fingerprint","typeLabel":"string"},"buyer_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.5.buyer_id","typeLabel":"string\u003cuuid>"}},"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.5","typeLabel":"object"},{"type":"object","required":["code","target","applicable","fingerprint","fields","effective_date","expiration_date"],"properties":{"code":{"type":"string","enum":["term"],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.6.code","typeLabel":"enum\u003cstring>"},"target":{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.6.target","typeLabel":"string"},"applicable":{"type":"boolean","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.6.applicable","typeLabel":"boolean"},"fingerprint":{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.6.fingerprint","typeLabel":"string"},"fields":{"type":"array","items":{"type":"string","enum":["issued_date","valid_from","valid_until"],"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.6.fields.items.[INDEX]","typeLabel":"enum\u003cstring>"},"minItems":1,"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.6.fields","typeLabel":"enum\u003cstring>[]"},"effective_date":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.6.effective_date.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.6.effective_date.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.6.effective_date","typeLabel":"string | null"},"expiration_date":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.6.expiration_date.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.6.expiration_date.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.6.expiration_date","typeLabel":"string | null"}},"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX].oneOf.6","typeLabel":"object"}],"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.findings","typeLabel":"object[]"},"lines":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The `line_id` of its line_items change.","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.lines.items.[INDEX].key","typeLabel":"string"},"outcome":{"type":"string","enum":["no_difference","differs","not_checked"],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.lines.items.[INDEX].outcome","typeLabel":"enum\u003cstring>"},"price_item_id":{"oneOf":[{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.lines.items.[INDEX].price_item_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.lines.items.[INDEX].price_item_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.lines.items.[INDEX].price_item_id","typeLabel":"string\u003cuuid> | null"},"agreement_unit_price":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.lines.items.[INDEX].agreement_unit_price.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.lines.items.[INDEX].agreement_unit_price.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.lines.items.[INDEX].agreement_unit_price","typeLabel":"string | null"},"copied_from_agreement":{"type":"boolean","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.lines.items.[INDEX].copied_from_agreement","typeLabel":"boolean"},"price_fingerprint":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.lines.items.[INDEX].price_fingerprint.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.lines.items.[INDEX].price_fingerprint.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.lines.items.[INDEX].price_fingerprint","typeLabel":"string | null"},"terms":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.lines.items.[INDEX].terms.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.lines.items.[INDEX].terms.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.lines.items.[INDEX].terms","typeLabel":"string | null"}},"required":["key","outcome","price_item_id","agreement_unit_price","copied_from_agreement","price_fingerprint","terms"],"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.lines.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0.lines","typeLabel":"object[]"}},"required":["findings","lines"],"description":"The proposed lines checked against the order's agreement, as getPurchaseOrderAgreementCheck checks the order's own; its findings cannot be applied. Null when the order has no agreement the caller can see.","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"findings":{"type":"array","items":{"oneOf":[{"type":"object","required":["code","target","applicable","line_key","fingerprint","evidence","current_unit_price","agreement_unit_price","quantity","amount_difference","unit_to_set"],"properties":{"code":{"type":"string","enum":["unit_price"]},"target":{"type":"string"},"applicable":{"type":"boolean"},"line_key":{"type":"string"},"fingerprint":{"type":"string"},"evidence":{"type":"object","properties":{"agreement_id":{"type":"string","format":"uuid"},"price_item_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"document_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"terms":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["agreement_id","price_item_id","document_id","terms"]},"current_unit_price":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"agreement_unit_price":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"quantity":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"amount_difference":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"unit_to_set":{"oneOf":[{"type":"string"},{"type":"null"}]}}},{"type":"object","required":["code","target","applicable","line_key","fingerprint","evidence","current_unit","agreement_unit","current_unit_price","agreement_unit_price"],"properties":{"code":{"type":"string","enum":["unit"]},"target":{"type":"string"},"applicable":{"type":"boolean"},"line_key":{"type":"string"},"fingerprint":{"type":"string"},"evidence":{"type":"object","properties":{"agreement_id":{"type":"string","format":"uuid"},"price_item_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"document_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"terms":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["agreement_id","price_item_id","document_id","terms"]},"current_unit":{"oneOf":[{"type":"string"},{"type":"null"}]},"agreement_unit":{"oneOf":[{"type":"string"},{"type":"null"}]},"current_unit_price":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"agreement_unit_price":{"oneOf":[{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},{"type":"null","pattern":"^-?\\d+(?:\\.\\d+)?$"}]}}},{"type":"object","required":["code","target","applicable","line_key","fingerprint"],"properties":{"code":{"type":"string","enum":["no_agreement_price"]},"target":{"type":"string"},"applicable":{"type":"boolean"},"line_key":{"type":"string"},"fingerprint":{"type":"string"}}},{"type":"object","required":["code","target","applicable","line_key","fingerprint","evidence","reason","price_item_ids"],"properties":{"code":{"type":"string","enum":["uncertain"]},"target":{"type":"string"},"applicable":{"type":"boolean"},"line_key":{"type":"string"},"fingerprint":{"type":"string"},"evidence":{"type":"object","properties":{"agreement_id":{"type":"string","format":"uuid"},"price_item_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"document_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"terms":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["agreement_id","price_item_id","document_id","terms"]},"reason":{"type":"string","enum":["calculation_rules","rate_price","ambiguous_price","no_valid_price","currency_mismatch","no_order_currency"]},"price_item_ids":{"type":"array","items":{"type":"string","format":"uuid"}}}},{"type":"object","required":["code","target","applicable","fingerprint","supplier_id"],"properties":{"code":{"type":"string","enum":["supplier"]},"target":{"type":"string"},"applicable":{"type":"boolean"},"fingerprint":{"type":"string"},"supplier_id":{"type":"string","format":"uuid"}}},{"type":"object","required":["code","target","applicable","fingerprint","buyer_id"],"properties":{"code":{"type":"string","enum":["buyer"]},"target":{"type":"string"},"applicable":{"type":"boolean"},"fingerprint":{"type":"string"},"buyer_id":{"type":"string","format":"uuid"}}},{"type":"object","required":["code","target","applicable","fingerprint","fields","effective_date","expiration_date"],"properties":{"code":{"type":"string","enum":["term"]},"target":{"type":"string"},"applicable":{"type":"boolean"},"fingerprint":{"type":"string"},"fields":{"type":"array","items":{"type":"string","enum":["issued_date","valid_from","valid_until"]},"minItems":1},"effective_date":{"oneOf":[{"type":"string"},{"type":"null"}]},"expiration_date":{"oneOf":[{"type":"string"},{"type":"null"}]}}}]}},"lines":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The `line_id` of its line_items change."},"outcome":{"type":"string","enum":["no_difference","differs","not_checked"]},"price_item_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"agreement_unit_price":{"oneOf":[{"type":"string"},{"type":"null"}]},"copied_from_agreement":{"type":"boolean"},"price_fingerprint":{"oneOf":[{"type":"string"},{"type":"null"}]},"terms":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["key","outcome","price_item_id","agreement_unit_price","copied_from_agreement","price_fingerprint","terms"]}}},"required":["findings","lines"],"description":"The proposed lines checked against the order's agreement, as getPurchaseOrderAgreementCheck checks the order's own; its findings cannot be applied. Null when the order has no agreement the caller can see.","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.agreement_check","typeLabel":"object | null"},"created_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0.created_at","typeLabel":"string\u003cdate-time>"}},"required":["id","revision","source","decided_by","prices_without_vat_basis","supplier_has_after_accept","proposed_by","document_ids","changes","currency_code","totals","agreement_check","created_at"],"description":"A change to the order's terms waiting for a decision: an edit that needs approval, or what a supplier's confirmation prints differently. The order keeps its current revision, which is what is sent and pushed, until it is accepted; its terms cannot change meanwhile. Null when none waits.","isRequired":true,"uniqueKey":"proposed_revision.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"id":{"type":"string","format":"uuid","description":"Send it as proposed_revision.id to accept or reject the proposed revision."},"revision":{"oneOf":[{"type":"integer","description":"The revision it makes once accepted; null on a draft, whose supplier's reply proposes its lines."},{"type":"null","description":"The revision it makes once accepted; null on a draft, whose supplier's reply proposes its lines."}]},"source":{"type":"string","enum":["member","supplier"],"description":"`member`: an edit that needs approval. `supplier`: read from a supplier's confirmation."},"decided_by":{"type":"string","enum":["approvers","members"],"description":"`approvers`: it needs approval, so the order's approval request decides it (approve or reject through approval). `members`: any member accepts or rejects it."},"prices_without_vat_basis":{"type":"boolean","description":"The supplier's document stated no VAT basis, so its prices were read as excluding VAT. Check them before accepting."},"supplier_has_after_accept":{"type":"boolean","description":"Accepting it leaves the supplier with the revision it makes: their own change to terms they had. Otherwise the order is sent to them afterwards."},"proposed_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":"The person who proposed it; null for a confirmation read without one."},{"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":"The person who proposed it; null for a confirmation read without one."}]},"document_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The order's documents it was read from, attachments first."},"changes":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"from":{"oneOf":[{"type":"string","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"}},{"type":"number","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"}},{"type":"boolean","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"}},{"type":"null","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"}},{"type":"array","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"}},{"type":"object","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"}}]},"to":{"oneOf":[{"type":"string","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"}},{"type":"number","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"}},{"type":"boolean","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"}},{"type":"null","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"}},{"type":"array","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"}},{"type":"object","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"}}]}},"required":["field","from","to"],"additionalProperties":{"oneOf":[{"type":"string","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"}},{"type":"number","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"}},{"type":"boolean","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"}},{"type":"null","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"}},{"type":"array","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"}},{"type":"object","items":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"},"additionalProperties":{"$circularRef":"a3113814-2b53-4527-86f0-1d9cbf41eeb0"}}]}},"description":"Each changed term (`field`, `from`, `to`) and each added, changed or cancelled line (`field` line_items with `line_id`), as the order activity shows changes. Empty when it can no longer be shown against the order."},"currency_code":{"oneOf":[{"type":"string","description":"The currency it gives the order, which `totals` are in; the order's own unless it changes it."},{"type":"null","description":"The currency it gives the order, which `totals` are in; the order's own unless it changes it."}]},"totals":{"type":"object","properties":{"lines_excluding_vat":{"type":"string"},"commitment":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["lines_excluding_vat","commitment"]},"agreement_check":{"oneOf":[{"type":"object","properties":{"findings":{"type":"array","items":{"oneOf":[{"type":"object","required":["code","target","applicable","line_key","fingerprint","evidence","current_unit_price","agreement_unit_price","quantity","amount_difference","unit_to_set"],"properties":{"code":{"type":"string","enum":["unit_price"]},"target":{"type":"string"},"applicable":{"type":"boolean"},"line_key":{"type":"string"},"fingerprint":{"type":"string"},"evidence":{"type":"object","properties":{"agreement_id":{"type":"string","format":"uuid"},"price_item_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"document_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"terms":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["agreement_id","price_item_id","document_id","terms"]},"current_unit_price":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"agreement_unit_price":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"quantity":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"amount_difference":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"unit_to_set":{"oneOf":[{"type":"string"},{"type":"null"}]}}},{"type":"object","required":["code","target","applicable","line_key","fingerprint","evidence","current_unit","agreement_unit","current_unit_price","agreement_unit_price"],"properties":{"code":{"type":"string","enum":["unit"]},"target":{"type":"string"},"applicable":{"type":"boolean"},"line_key":{"type":"string"},"fingerprint":{"type":"string"},"evidence":{"type":"object","properties":{"agreement_id":{"type":"string","format":"uuid"},"price_item_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"document_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"terms":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["agreement_id","price_item_id","document_id","terms"]},"current_unit":{"oneOf":[{"type":"string"},{"type":"null"}]},"agreement_unit":{"oneOf":[{"type":"string"},{"type":"null"}]},"current_unit_price":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"agreement_unit_price":{"oneOf":[{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},{"type":"null","pattern":"^-?\\d+(?:\\.\\d+)?$"}]}}},{"type":"object","required":["code","target","applicable","line_key","fingerprint"],"properties":{"code":{"type":"string","enum":["no_agreement_price"]},"target":{"type":"string"},"applicable":{"type":"boolean"},"line_key":{"type":"string"},"fingerprint":{"type":"string"}}},{"type":"object","required":["code","target","applicable","line_key","fingerprint","evidence","reason","price_item_ids"],"properties":{"code":{"type":"string","enum":["uncertain"]},"target":{"type":"string"},"applicable":{"type":"boolean"},"line_key":{"type":"string"},"fingerprint":{"type":"string"},"evidence":{"type":"object","properties":{"agreement_id":{"type":"string","format":"uuid"},"price_item_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"document_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"terms":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["agreement_id","price_item_id","document_id","terms"]},"reason":{"type":"string","enum":["calculation_rules","rate_price","ambiguous_price","no_valid_price","currency_mismatch","no_order_currency"]},"price_item_ids":{"type":"array","items":{"type":"string","format":"uuid"}}}},{"type":"object","required":["code","target","applicable","fingerprint","supplier_id"],"properties":{"code":{"type":"string","enum":["supplier"]},"target":{"type":"string"},"applicable":{"type":"boolean"},"fingerprint":{"type":"string"},"supplier_id":{"type":"string","format":"uuid"}}},{"type":"object","required":["code","target","applicable","fingerprint","buyer_id"],"properties":{"code":{"type":"string","enum":["buyer"]},"target":{"type":"string"},"applicable":{"type":"boolean"},"fingerprint":{"type":"string"},"buyer_id":{"type":"string","format":"uuid"}}},{"type":"object","required":["code","target","applicable","fingerprint","fields","effective_date","expiration_date"],"properties":{"code":{"type":"string","enum":["term"]},"target":{"type":"string"},"applicable":{"type":"boolean"},"fingerprint":{"type":"string"},"fields":{"type":"array","items":{"type":"string","enum":["issued_date","valid_from","valid_until"]},"minItems":1},"effective_date":{"oneOf":[{"type":"string"},{"type":"null"}]},"expiration_date":{"oneOf":[{"type":"string"},{"type":"null"}]}}}]}},"lines":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The `line_id` of its line_items change."},"outcome":{"type":"string","enum":["no_difference","differs","not_checked"]},"price_item_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"agreement_unit_price":{"oneOf":[{"type":"string"},{"type":"null"}]},"copied_from_agreement":{"type":"boolean"},"price_fingerprint":{"oneOf":[{"type":"string"},{"type":"null"}]},"terms":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["key","outcome","price_item_id","agreement_unit_price","copied_from_agreement","price_fingerprint","terms"]}}},"required":["findings","lines"],"description":"The proposed lines checked against the order's agreement, as getPurchaseOrderAgreementCheck checks the order's own; its findings cannot be applied. Null when the order has no agreement the caller can see."},{"type":"null","properties":{"findings":{"type":"array","items":{"oneOf":[{"type":"object","required":["code","target","applicable","line_key","fingerprint","evidence","current_unit_price","agreement_unit_price","quantity","amount_difference","unit_to_set"],"properties":{"code":{"type":"string","enum":["unit_price"]},"target":{"type":"string"},"applicable":{"type":"boolean"},"line_key":{"type":"string"},"fingerprint":{"type":"string"},"evidence":{"type":"object","properties":{"agreement_id":{"type":"string","format":"uuid"},"price_item_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"document_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"terms":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["agreement_id","price_item_id","document_id","terms"]},"current_unit_price":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"agreement_unit_price":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"quantity":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"amount_difference":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"unit_to_set":{"oneOf":[{"type":"string"},{"type":"null"}]}}},{"type":"object","required":["code","target","applicable","line_key","fingerprint","evidence","current_unit","agreement_unit","current_unit_price","agreement_unit_price"],"properties":{"code":{"type":"string","enum":["unit"]},"target":{"type":"string"},"applicable":{"type":"boolean"},"line_key":{"type":"string"},"fingerprint":{"type":"string"},"evidence":{"type":"object","properties":{"agreement_id":{"type":"string","format":"uuid"},"price_item_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"document_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"terms":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["agreement_id","price_item_id","document_id","terms"]},"current_unit":{"oneOf":[{"type":"string"},{"type":"null"}]},"agreement_unit":{"oneOf":[{"type":"string"},{"type":"null"}]},"current_unit_price":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"agreement_unit_price":{"oneOf":[{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},{"type":"null","pattern":"^-?\\d+(?:\\.\\d+)?$"}]}}},{"type":"object","required":["code","target","applicable","line_key","fingerprint"],"properties":{"code":{"type":"string","enum":["no_agreement_price"]},"target":{"type":"string"},"applicable":{"type":"boolean"},"line_key":{"type":"string"},"fingerprint":{"type":"string"}}},{"type":"object","required":["code","target","applicable","line_key","fingerprint","evidence","reason","price_item_ids"],"properties":{"code":{"type":"string","enum":["uncertain"]},"target":{"type":"string"},"applicable":{"type":"boolean"},"line_key":{"type":"string"},"fingerprint":{"type":"string"},"evidence":{"type":"object","properties":{"agreement_id":{"type":"string","format":"uuid"},"price_item_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"document_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"terms":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["agreement_id","price_item_id","document_id","terms"]},"reason":{"type":"string","enum":["calculation_rules","rate_price","ambiguous_price","no_valid_price","currency_mismatch","no_order_currency"]},"price_item_ids":{"type":"array","items":{"type":"string","format":"uuid"}}}},{"type":"object","required":["code","target","applicable","fingerprint","supplier_id"],"properties":{"code":{"type":"string","enum":["supplier"]},"target":{"type":"string"},"applicable":{"type":"boolean"},"fingerprint":{"type":"string"},"supplier_id":{"type":"string","format":"uuid"}}},{"type":"object","required":["code","target","applicable","fingerprint","buyer_id"],"properties":{"code":{"type":"string","enum":["buyer"]},"target":{"type":"string"},"applicable":{"type":"boolean"},"fingerprint":{"type":"string"},"buyer_id":{"type":"string","format":"uuid"}}},{"type":"object","required":["code","target","applicable","fingerprint","fields","effective_date","expiration_date"],"properties":{"code":{"type":"string","enum":["term"]},"target":{"type":"string"},"applicable":{"type":"boolean"},"fingerprint":{"type":"string"},"fields":{"type":"array","items":{"type":"string","enum":["issued_date","valid_from","valid_until"]},"minItems":1},"effective_date":{"oneOf":[{"type":"string"},{"type":"null"}]},"expiration_date":{"oneOf":[{"type":"string"},{"type":"null"}]}}}]}},"lines":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The `line_id` of its line_items change."},"outcome":{"type":"string","enum":["no_difference","differs","not_checked"]},"price_item_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null","format":"uuid"}]},"agreement_unit_price":{"oneOf":[{"type":"string"},{"type":"null"}]},"copied_from_agreement":{"type":"boolean"},"price_fingerprint":{"oneOf":[{"type":"string"},{"type":"null"}]},"terms":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["key","outcome","price_item_id","agreement_unit_price","copied_from_agreement","price_fingerprint","terms"]}}},"required":["findings","lines"],"description":"The proposed lines checked against the order's agreement, as getPurchaseOrderAgreementCheck checks the order's own; its findings cannot be applied. Null when the order has no agreement the caller can see."}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","revision","source","decided_by","prices_without_vat_basis","supplier_has_after_accept","proposed_by","document_ids","changes","currency_code","totals","agreement_check","created_at"],"description":"A change to the order's terms waiting for a decision: an edit that needs approval, or what a supplier's confirmation prints differently. The order keeps its current revision, which is what is sent and pushed, until it is accepted; its terms cannot change meanwhile. Null when none waits.","isRequired":true,"uniqueKey":"proposed_revision.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"proposed_revision","typeLabel":"object | null"},"supplier_reply":{"type":"object","properties":{"request":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["order","price_request"],"description":"order: the order was sent. price_request: a price was asked for.","isRequired":true,"uniqueKey":"supplier_reply.request.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"sent_at":{"type":"string","format":"date-time","description":"When it went out, or may have.","isRequired":true,"uniqueKey":"supplier_reply.request.oneOf.0.sent_at","typeLabel":"string\u003cdate-time>"},"sent_to":{"type":"array","items":{"type":"string","uniqueKey":"supplier_reply.request.oneOf.0.sent_to.items.[INDEX]","typeLabel":"string"},"description":"Its To addresses.","isRequired":true,"uniqueKey":"supplier_reply.request.oneOf.0.sent_to","typeLabel":"string[]"},"replied_at":{"oneOf":[{"type":"string","format":"date-time","description":"When the supplier's latest email after it arrived, at the reply address or forwarded by a member; null while it waits for an answer.","isRequired":true,"uniqueKey":"supplier_reply.request.oneOf.0.replied_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the supplier's latest email after it arrived, at the reply address or forwarded by a member; null while it waits for an answer.","isRequired":true,"uniqueKey":"supplier_reply.request.oneOf.0.replied_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"supplier_reply.request.oneOf.0.replied_at","typeLabel":"string\u003cdate-time> | null"}},"required":["kind","sent_at","sent_to","replied_at"],"description":"The latest email that asked the supplier for something: the order, or a price. Messages ask for nothing, so they are not one. Null when none went out.","isRequired":true,"uniqueKey":"supplier_reply.request.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"kind":{"type":"string","enum":["order","price_request"],"description":"order: the order was sent. price_request: a price was asked for."},"sent_at":{"type":"string","format":"date-time","description":"When it went out, or may have."},"sent_to":{"type":"array","items":{"type":"string"},"description":"Its To addresses."},"replied_at":{"oneOf":[{"type":"string","format":"date-time","description":"When the supplier's latest email after it arrived, at the reply address or forwarded by a member; null while it waits for an answer."},{"type":"null","format":"date-time","description":"When the supplier's latest email after it arrived, at the reply address or forwarded by a member; null while it waits for an answer."}]}},"required":["kind","sent_at","sent_to","replied_at"],"description":"The latest email that asked the supplier for something: the order, or a price. Messages ask for nothing, so they are not one. Null when none went out.","isRequired":true,"uniqueKey":"supplier_reply.request.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"supplier_reply.request","typeLabel":"object | null"},"confirmed_at":{"oneOf":[{"type":"string","format":"date-time","description":"When the supplier confirmed the order's current terms: their confirmation matched them, or the changes it proposed were accepted. A member's change to the terms clears it; a later delivery notice or message does not. A draft they confirmed only needs opening.","isRequired":true,"uniqueKey":"supplier_reply.confirmed_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the supplier confirmed the order's current terms: their confirmation matched them, or the changes it proposed were accepted. A member's change to the terms clears it; a later delivery notice or message does not. A draft they confirmed only needs opening.","isRequired":true,"uniqueKey":"supplier_reply.confirmed_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"supplier_reply.confirmed_at","typeLabel":"string\u003cdate-time> | null"}},"required":["request","confirmed_at"],"description":"What the order waits for from its supplier, and whether they confirmed it. Derived from the emails sent and the supplier's documents received.","isRequired":true,"uniqueKey":"supplier_reply","typeLabel":"object"}},"required":["company_id","id","number","title","status","awaiting_approval","approvers","archived","supplier","buyer","owner_user_id","agreement","currency_code","commitment_basis","totals","billing","revision","open_alert_count","valid_until","origin","source","from_import","created_at","updated_at","lifecycle","emails","status_reason","owner","invoice_approvers","amount_limit","unordered_charges","unordered_charges_limit","scope_description","issued_date","valid_from","delivery_date","delivery","buyer_reference","sales_order_reference","contract_reference","project_reference","dimension_values","note_to_supplier","internal_note","budget","billing_review","invoice_checks","line_items","push_targets","latest_push","push_readiness","to_fill","sent_to_supplier","supplier_revision","placement","approval","approval_required","opened_at","closed_at","cancelled_at","archived_at","import","proposed_revision","supplier_reply"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"company_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","number":"\u003cstring>","title":"\u003cstring>","status":"draft","awaiting_approval":true,"approvers":[{"user_id":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","email":"\u003cstring>"}],"archived":true,"supplier":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"\u003cstring>","organization_number":"\u003cstring>"},"buyer":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"\u003cstring>","organization_number":"\u003cstring>"},"owner_user_id":"\u003cstring>","agreement":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","title":"\u003cstring>","origin":"manual","restricted":true},"currency_code":"\u003cstring>","commitment_basis":"lines","totals":{"lines_excluding_vat":"\u003cstring>","commitment":"\u003cstring>","expected":"\u003cstring>"},"billing":{"linked_invoices":1,"billed":"\u003cstring>","remaining":"\u003cstring>","excess":"\u003cstring>","authoritative":true,"coverage":{"pending_suggestions":1,"unsupported_credits":1,"incompatible_invoices":1,"invalid_invoices":1,"unassigned_invoices":1,"reconciliation_pending":true},"untied":{"lines":1,"amount":"\u003cstring>"}},"revision":123,"open_alert_count":1,"valid_until":"\u003cstring>","origin":"native","source":{"system":"\u003cstring>","id":"\u003cstring>","number":"\u003cstring>","channel":"integration","status":"\u003cstring>","refreshed_at":"2023-11-07T05:31:56Z","synced_revision":123,"pending":true},"from_import":true,"created_at":"2023-11-07T05:31:56Z","updated_at":"2023-11-07T05:31:56Z","lifecycle":{"status":"draft","blockers":["archived"],"next_action":{"kind":"restore","mine":true,"waiting_on":["\u003cstring>"],"disabled_by":["archived"]}},"emails":{"message":true,"price_request":true,"order":true},"status_reason":"\u003cstring>","owner":{"user_id":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","email":"\u003cstring>"},"invoice_approvers":{"people":[{"user_id":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","email":"\u003cstring>","step":123}],"teams":[{"team_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"\u003cstring>","step":123}]},"amount_limit":"\u003cstring>","unordered_charges":"flag","unordered_charges_limit":"\u003cstring>","scope_description":"\u003cstring>","issued_date":"\u003cstring>","valid_from":"\u003cstring>","delivery_date":"\u003cstring>","delivery":{"name":"\u003cstring>","address":{"street":"\u003cstring>","postal_code":"\u003cstring>","city":"\u003cstring>","country_code":"\u003cstring>"}},"buyer_reference":"\u003cstring>","sales_order_reference":"\u003cstring>","contract_reference":"\u003cstring>","project_reference":"\u003cstring>","dimension_values":[{"dimension_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","dimension_name":"\u003cstring>","dimension_kind":"department","id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"\u003cstring>","usable":true,"code":"\u003cstring>"}],"note_to_supplier":"\u003cstring>","internal_note":"\u003cstring>","budget":"\u003cstring>","billing_review":{"amount_status":"unknown","single_invoice":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","number":"\u003cstring>"},"quantity":{"single_invoice_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","lines":1,"invoices":1,"amount":"\u003cstring>"},"received":{"single_invoice_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","lines":1,"invoices":1,"amount":"\u003cstring>"},"unit_price":{"single_invoice_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","lines":1,"invoices":1,"amount":"\u003cstring>"},"vat_rate":{"single_invoice_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","lines":1,"invoices":1,"amount":"\u003cstring>"},"unmatched":{"single_invoice_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","lines":1,"invoices":1,"amount":"\u003cstring>"},"lines":[{"purchase_order_line_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","codes":["quantity"]}]},"invoice_checks":{"checked":1},"line_items":[{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","line_reference":"\u003cstring>","item":{"name":"\u003cstring>","description":"\u003cstring>","product_code":"\u003cstring>","buyer_product_code":"\u003cstring>"},"quantity":"\u003cstring>","unit":"\u003cstring>","unit_price":"\u003cstring>","total_excluding_vat":"\u003cstring>","vat_rate":"\u003cstring>","kind":"item","status":"active","billed_amount":"\u003cstring>","invoice_summary":{"invoices":1,"unit_price_min":"\u003cstring>","unit_price_max":"\u003cstring>","unit_price_difference":"\u003cstring>","price_difference_invoices":1,"grouped_invoice_lines":[{"invoice_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","invoice_number":"\u003cstring>","invoice_item_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","line_number":123,"description":"\u003cstring>","purchase_order_line_ids":["3c90c3cc-0d44-4b50-8888-8dd25736052a"]}]},"invoice_check":"clean","billed_quantity":"\u003cstring>","quantity_complete":true,"billed_unit":"\u003cstring>","gross_unit_price":"\u003cstring>","agreement_item_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","source_line_id":"\u003cstring>","coding":{"account":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"\u003cstring>","usable":true,"number":"\u003cstring>"},"vat_code":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"\u003cstring>","usable":true,"code":"\u003cstring>","rate":"\u003cstring>"},"dimension_values":[{"dimension_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","dimension_name":"\u003cstring>","dimension_kind":"department","id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"\u003cstring>","usable":true,"code":"\u003cstring>"}]},"received":{"quantity":"\u003cstring>","unit":"\u003cstring>","last_received_on":"2023-12-25"}}],"push_targets":[{"integration_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","integration_name":"\u003cstring>","system":"\u003cstring>"}],"latest_push":{"workflow_run_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","integration_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","integration_name":"\u003cstring>","status":"queued","failure":{"code":"\u003cstring>","message":"\u003cstring>","overwritable":true}},"push_readiness":[{"code":"\u003cstring>","field":"\u003cstring>","message":"\u003cstring>"}],"to_fill":[{"field":"dimension","message":"\u003cstring>","dimension_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","dimension_name":"\u003cstring>"}],"sent_to_supplier":{"channel":"email","revision":123,"sent_at":"2023-11-07T05:31:56Z","pending":true},"supplier_revision":123,"placement":"watchdog","approval":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","status":"pending","sent":true,"revision":123,"proposal_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","approvers":[{"user_id":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","email":"\u003cstring>","source":"person","decision":"approved"}],"approver_teams":[{"team_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"\u003cstring>","source":"person","decision":"approved","decided_by":{"user_id":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","email":"\u003cstring>"},"nobody_can_act":true,"members":[{"user_id":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","email":"\u003cstring>"}]}],"skipped_approvers":[{"user_id":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","email":"\u003cstring>","reason":"no_access"}],"skipped_teams":[{"team_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"\u003cstring>"}],"requested_at":"2023-11-07T05:31:56Z","decided_at":"2023-11-07T05:31:56Z","decided_by":{"user_id":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","email":"\u003cstring>"},"rejection_reason":"\u003cstring>"},"approval_required":true,"opened_at":"2023-11-07T05:31:56Z","closed_at":"2023-11-07T05:31:56Z","cancelled_at":"2023-11-07T05:31:56Z","archived_at":"2023-11-07T05:31:56Z","import":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","intent":"new","missing":[{"field":"supplier","line_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","note":"\u003cstring>"}],"printed":{"supplier":{"name":"\u003cstring>","organization_number":"\u003cstring>","vat_number":"\u003cstring>"},"buyer":{"name":"\u003cstring>","organization_number":"\u003cstring>","vat_number":"\u003cstring>"}}},"proposed_revision":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","revision":123,"source":"member","decided_by":"approvers","prices_without_vat_basis":true,"supplier_has_after_accept":true,"proposed_by":{"user_id":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","email":"\u003cstring>"},"document_ids":["3c90c3cc-0d44-4b50-8888-8dd25736052a"],"changes":[{"field":"\u003cstring>","from":"\u003cstring>","to":"\u003cstring>"}],"currency_code":"\u003cstring>","totals":{"lines_excluding_vat":"\u003cstring>","commitment":"\u003cstring>"},"agreement_check":{"findings":[{"code":"unit_price","target":"\u003cstring>","applicable":true,"line_key":"\u003cstring>","fingerprint":"\u003cstring>","evidence":{"agreement_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","price_item_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","document_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","terms":"\u003cstring>"},"current_unit_price":"\u003cstring>","agreement_unit_price":"\u003cstring>","quantity":"\u003cstring>","amount_difference":"\u003cstring>","unit_to_set":"\u003cstring>"}],"lines":[{"key":"\u003cstring>","outcome":"no_difference","price_item_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","agreement_unit_price":"\u003cstring>","copied_from_agreement":true,"price_fingerprint":"\u003cstring>","terms":"\u003cstring>"}]},"created_at":"2023-11-07T05:31:56Z"},"supplier_reply":{"request":{"kind":"order","sent_at":"2023-11-07T05:31:56Z","sent_to":["\u003cstring>"],"replied_at":"2023-11-07T05:31:56Z"},"confirmed_at":"2023-11-07T05:31:56Z"}}}},"exampleType":"generated"}},"exampleType":"generated"},"b958acbe-9440-4ef5-8bd9-9d9fa05566fe":{"description":"No approver to add or remove, the same person both added and removed, or an added user is not a member with write access who can see the order. Nothing changed.","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 approver to add or remove, the same person both added and removed, or an added user is not a member with write access who can see the order. Nothing changed.","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 approver to add or remove, the same person both added and removed, or an added user is not a member with write access who can see the order. Nothing changed.","request_id":"req_example"}}}},"exampleType":"examples"}},"exampleType":"examples"},"c2bb64e6-7ffb-4332-98b0-3f2545edf1ef":{"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"},"18611ab5-5205-4f29-9ad3-4112667968ca":{"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"},"2ef7224c-2517-4a5b-a654-ada386d8e158":{"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"},"4860f77d-77d6-4695-b073-ce0bcb370cb9":{"description":"Only removing: the order has no approval waiting. Adding: the order is imported, closed or cancelled.","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":"Only removing: the order has no approval waiting. Adding: the order is imported, closed or cancelled.","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":"Only removing: the order has no approval waiting. Adding: the order is imported, closed or cancelled.","request_id":"req_example"}}}},"exampleType":"examples"}},"exampleType":"examples"},"70116c61-e53f-4b1c-ad93-385e9f9383a2":{"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"},"9593156f-391e-4168-bf08-17fb8fab3df1":{"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"},"97d16df9-dd2b-4d72-a3a3-92ce868fdaff":{"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":{"73faee5a-d597-4769-b6f7-f169a3736748":{"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"}},"schemas":{"a3113814-2b53-4527-86f0-1d9cbf41eeb0":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"oneOf":[{}]}},{"type":"object"}]}},"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":"Add or remove purchase order approvers - Watchdog Help Center","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/endpoints/purchase-orders/add-or-remove-purchase-order-approvers","matchLevel":0},"no":{"href":"/no","matchLevel":4}}},"lastModified":"2026-11-18T12:34:01.304Z","originalFileLocation":"api-reference/endpoints/purchase-orders/add-or-remove-purchase-order-approvers.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=\"Adds and removes approvers by hand, at any time before a decision. On a draft that waits for nobody, approvers are picked, also while the draft is incomplete: they are asked once the draft is opened (updatePurchaseOrder with status open), and approval.sent stays false until then. On a draft that waits, or an open order whose proposed revision waits, they join that request. Removing the last approver withdraws a waiting request unless an approval rule requires approval. Any one approver decides, with updatePurchaseOrder and approval. Approval rules bind everyone but admins: removing an approver a rule added (other than yourself), or adding yourself to an order a rule already chose approvers for, returns 403; adding colleagues stays open. People removed here are not added back by approval rules until someone adds them again. Adding an approver or removing someone who is not one changes nothing. Added approvers of a waiting request are emailed unless they turned off Orders to approve; picked ones once the draft is opened. Recorded in the order\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=\"Add or remove purchase order approvers - Watchdog Help Center\">\u003cmeta data-mint-head property=\"og:description\" content=\"Adds and removes approvers by hand, at any time before a decision. On a draft that waits for nobody, approvers are picked, also while the draft is incomplete: they are asked once the draft is opened (updatePurchaseOrder with status open), and approval.sent stays false until then. On a draft that waits, or an open order whose proposed revision waits, they join that request. Removing the last approver withdraws a waiting request unless an approval rule requires approval. Any one approver decides, with updatePurchaseOrder and approval. Approval rules bind everyone but admins: removing an approver a rule added (other than yourself), or adding yourself to an order a rule already chose approvers for, returns 403; adding colleagues stays open. People removed here are not added back by approval rules until someone adds them again. Adding an approver or removing someone who is not one changes nothing. Added approvers of a waiting request are emailed unless they turned off Orders to approve; picked ones once the draft is opened. Recorded in the order\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/purchase-orders/add-or-remove-purchase-order-approvers\">\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=Purchase+orders\u0026amp;title=Add+or+remove+purchase+order+approvers\u0026amp;description=Adds+and+removes+approvers+by+hand%2C+at+any+time+before+a+decision.+On+a+draft+that+waits+for+nobody%2C+approvers+are+picked%2C+also+while+the+draft+is+incomplete%3A+t\u0026amp;theme=3ce0d3a3382d965df629a40c\u0026amp;signature=ede4e400aaf996621079d18a28b05bb718abe2b743427c8d9e9cd03ac66db91b\">\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=\"Add or remove purchase order approvers - Watchdog Help Center\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Adds and removes approvers by hand, at any time before a decision. On a draft that waits for nobody, approvers are picked, also while the draft is incomplete: they are asked once the draft is opened (updatePurchaseOrder with status open), and approval.sent stays false until then. On a draft that waits, or an open order whose proposed revision waits, they join that request. Removing the last approver withdraws a waiting request unless an approval rule requires approval. Any one approver decides, with updatePurchaseOrder and approval. Approval rules bind everyone but admins: removing an approver a rule added (other than yourself), or adding yourself to an order a rule already chose approvers for, returns 403; adding colleagues stays open. People removed here are not added back by approval rules until someone adds them again. Adding an approver or removing someone who is not one changes nothing. Added approvers of a waiting request are emailed unless they turned off Orders to approve; picked ones once the draft is opened. Recorded in the order\u0026#x27;s activity.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://watchdog-7cea1057.mintlify.site/_mintlify/api/og/v2?division=Purchase+orders\u0026amp;title=Add+or+remove+purchase+order+approvers\u0026amp;description=Adds+and+removes+approvers+by+hand%2C+at+any+time+before+a+decision.+On+a+draft+that+waits+for+nobody%2C+approvers+are+picked%2C+also+while+the+draft+is+incomplete%3A+t\u0026amp;theme=3ce0d3a3382d965df629a40c\u0026amp;signature=ede4e400aaf996621079d18a28b05bb718abe2b743427c8d9e9cd03ac66db91b\">\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/purchase-orders/add-or-remove-purchase-order-approvers\">\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/purchase-orders/add-or-remove-purchase-order-approvers.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/purchase-orders/add-or-remove-purchase-order-approvers#webpage\",\"url\":\"https://docs.watchdog.no/api-reference/endpoints/purchase-orders/add-or-remove-purchase-order-approvers\",\"name\":\"Add or remove purchase order approvers\",\"description\":\"Adds and removes approvers by hand, at any time before a decision. On a draft that waits for nobody, approvers are picked, also while the draft is incomplete: they are asked once the draft is opened (updatePurchaseOrder with status open), and approval.sent stays false until then. On a draft that waits, or an open order whose proposed revision waits, they join that request. Removing the last approver withdraws a waiting request unless an approval rule requires approval. Any one approver decides, with updatePurchaseOrder and approval. Approval rules bind everyone but admins: removing an approver a rule added (other than yourself), or adding yourself to an order a rule already chose approvers for, returns 403; adding colleagues stays open. People removed here are not added back by approval rules until someone adds them again. Adding an approver or removing someone who is not one changes nothing. Added approvers of a waiting request are emailed unless they turned off Orders to approve; picked ones once the draft is opened. Recorded in the order's activity.\",\"dateModified\":\"2026-11-18T12:34:01.304Z\",\"isPartOf\":{\"@id\":\"https://docs.watchdog.no#website\"},\"breadcrumb\":{\"@id\":\"https://docs.watchdog.no/api-reference/endpoints/purchase-orders/add-or-remove-purchase-order-approvers#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.watchdog.no/api-reference/endpoints/purchase-orders/add-or-remove-purchase-order-approvers#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\":\"Purchase orders\",\"item\":\"https://docs.watchdog.no/api-reference/endpoints/purchase-orders/list-purchase-orders\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Add or remove purchase order approvers\",\"item\":\"https://docs.watchdog.no/api-reference/endpoints/purchase-orders/add-or-remove-purchase-order-approvers\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.watchdog.no/api-reference/endpoints/purchase-orders/add-or-remove-purchase-order-approvers#apireference\",\"headline\":\"Add or remove purchase order approvers\",\"name\":\"Add or remove purchase order approvers\",\"description\":\"Adds and removes approvers by hand, at any time before a decision. On a draft that waits for nobody, approvers are picked, also while the draft is incomplete: they are asked once the draft is opened (updatePurchaseOrder with status open), and approval.sent stays false until then. On a draft that waits, or an open order whose proposed revision waits, they join that request. Removing the last approver withdraws a waiting request unless an approval rule requires approval. Any one approver decides, with updatePurchaseOrder and approval. Approval rules bind everyone but admins: removing an approver a rule added (other than yourself), or adding yourself to an order a rule already chose approvers for, returns 403; adding colleagues stays open. People removed here are not added back by approval rules until someone adds them again. Adding an approver or removing someone who is not one changes nothing. Added approvers of a waiting request are emailed unless they turned off Orders to approve; picked ones once the draft is opened. Recorded in the order's activity.\",\"url\":\"https://docs.watchdog.no/api-reference/endpoints/purchase-orders/add-or-remove-purchase-order-approvers\",\"mainEntityOfPage\":{\"@id\":\"https://docs.watchdog.no/api-reference/endpoints/purchase-orders/add-or-remove-purchase-order-approvers#webpage\"},\"dateModified\":\"2026-11-18T12:34:01.304Z\",\"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/purchase-orders/add-or-remove-purchase-order-approvers.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","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","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","description":"Send only the fields to change; null clears a field. Changes to a draft, and to an opened order's title, owner, internal note, invoice approvers, status, archiving and agreement, need no revision: the last save wins. Changing an opened order's terms (the note to the supplier among them) or lines needs expected_revision and records a new revision. The supplier, buyer, currency and commitment basis are terms; on an order pushed to an ERP, or while a push is queued or running, changing them returns 409 (pushed), and a new supplier unlinks an agreement that names other suppliers unless agreement_id is sent too. On an opened order, a term change that an approval rule for orders matches and that raises the commitment or changes the supplier (a new currency or commitment basis counts as a raise) becomes the order's proposed_revision and asks for approval, while the rest of the request applies; until it is decided, changing the terms returns 409 (proposal_waiting), and closing or cancelling the order withdraws it. The resulting order is validated as a whole: a request that would leave it invalid returns 400 and changes nothing. Edits start no invoice matching: refreshPurchaseOrderInvoices reconciles the order's invoices on request, and a linked invoice whose supplier or buyer differs from the order's reads parties_differ.","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","description":"Sets goods received on an opened order's lines, each by Watchdog's line ID or the line's ID in the order's other system (source_line_id), as the line's received total so far in its unit (a delivery raises it, a return lowers it). A total equal to the line's changes nothing, so repeating a request is safe. Invoices billing more than was received are then flagged on the order's invoice checks once they are checked again.","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":"Add or remove purchase order approvers - 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"]}